From cb7037072e7aa443864b09f58dedc4c8a5f9ead9 Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 13 Sep 2023 09:06:44 +0200 Subject: [PATCH] add dict annotation --- lib/geolocProfiles.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/geolocProfiles.py b/lib/geolocProfiles.py index 4cb82e6..47ca24f 100755 --- a/lib/geolocProfiles.py +++ b/lib/geolocProfiles.py @@ -42,7 +42,7 @@ class GeolocProfiles(CesiumCommon): ) scroll_id = response.json()["_scroll_id"] - finalResult = response.json()["hits"]["hits"] + finalResult: dict | None = response.json()["hits"]["hits"] while True: # Send a scroll request to get the next page @@ -77,14 +77,14 @@ class GeolocProfiles(CesiumCommon): def formatProfiles(self, cesiumProfiles, gvaProfiles): walletsResult = [] for profile in cesiumProfiles: - source = profile["_source"] - pubkey = profile["_id"] + source: dict = profile["_source"] + pubkey: dict = profile["_id"] if pubkey not in gvaProfiles: continue # Extract necessary information from the profiles - id_info = gvaProfiles[pubkey].get("id") or {} + id_info: dict = gvaProfiles[pubkey].get("id") or {} isMember = id_info.get("isMember", False) userId = id_info.get("username") title = source.get("title")