Skip to content

Commit 6d62771

Browse files
committed
Fix linter warnings
- Add timeout parameter to requests call - Remove unused import
1 parent 0fa5598 commit 6d62771

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

climada/util/finance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import json
2525
import logging
2626
import shutil
27-
import warnings
2827
import zipfile
2928
from pathlib import Path
3029

@@ -209,7 +208,8 @@ def download_world_bank_indicator(
209208
while page <= pages:
210209
response = requests.get(
211210
f"https://api.worldbank.org/v2/countries/{country_code}/indicators/"
212-
f"{indicator}?format=json&page={page}"
211+
f"{indicator}?format=json&page={page}",
212+
timeout=30,
213213
)
214214
json_data = json.loads(response.text)
215215

0 commit comments

Comments
 (0)