Skip to content

Commit

Permalink
Fix type hinting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Schalk1e committed Oct 3, 2024
1 parent bb30fec commit 736a288
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rdw_ingestion_tools/api/content_repo/extensions/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def get_paginated(

data: dict = response.json()

results: dict = data["results"]
results: list[dict] = data["results"]

yield from results

url = data["next"]
Expand Down
3 changes: 2 additions & 1 deletion rdw_ingestion_tools/api/survey/extensions/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def get_paginated(
response = client.get(url=url, params=params)
response.raise_for_status()

data: dict = response.json()["results"]
data: list[dict] = response.json()["results"]

yield from data

url = response.json()["next"]
Expand Down
2 changes: 1 addition & 1 deletion rdw_ingestion_tools/api/turn/extensions/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_paginated(

response_json: dict = response.json()

response_data: dict = response_json["data"]
response_data: list[dict] = response_json["data"]
yield from response_data

try:
Expand Down
3 changes: 2 additions & 1 deletion rdw_ingestion_tools/api/turn_bq/extensions/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def get_paginated(

response_json: dict = response.json()

response_data: dict = response_json["items"]
response_data: list[dict] = response_json["items"]

yield from response_data

if response_json["page"] < response_json["pages"]:
Expand Down

0 comments on commit 736a288

Please sign in to comment.