From 0c589a075394d38c769cdb4e1b6ff9e6419bf044 Mon Sep 17 00:00:00 2001
From: Neda Moeini <neda.moeini@geant.org>
Date: Fri, 5 Jul 2024 10:46:13 +0200
Subject: [PATCH] Fixed type hinting in get_netdash_equipment function to
 support older Python versions

---
 inventory_provider/routes/poller.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inventory_provider/routes/poller.py b/inventory_provider/routes/poller.py
index 0bbbc3b8..bfa4844d 100644
--- a/inventory_provider/routes/poller.py
+++ b/inventory_provider/routes/poller.py
@@ -74,6 +74,7 @@ import json
 import logging
 import re
 from functools import partial
+from typing import Dict
 
 from flask import Blueprint, Response, current_app, request, jsonify
 
@@ -914,7 +915,7 @@ def interfaces(hostname=None):
     return Response(result, mimetype="application/json")
 
 
-def get_netdash_equipment() -> dict[str, str]:
+def get_netdash_equipment() -> Dict[str, str]:
     """Get the netdash equipment mapping from redis."""
     current_redis = common.get_current_redis()
     return json.loads(current_redis.get('netdash').decode('utf-8'))
-- 
GitLab