add dict annotation

This commit is contained in:
poka 2023-09-13 09:06:44 +02:00
parent 1737080b82
commit cb7037072e
1 changed files with 4 additions and 4 deletions

View File

@ -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")