mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -8,7 +8,7 @@ def get_ip_geolocation(ip_address: str) -> str:
|
||||
url = f"https://ipinfo.io/{ip_address}/json"
|
||||
|
||||
# Send a GET request to the API
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=10)
|
||||
|
||||
# Check if the HTTP request was successful
|
||||
response.raise_for_status()
|
||||
|
Reference in New Issue
Block a user