add dict annotation
This commit is contained in:
parent
1737080b82
commit
cb7037072e
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue