mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 02:13:15 +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:
@ -176,7 +176,7 @@ def convert_currency(
|
||||
params = locals()
|
||||
# from is a reserved keyword
|
||||
params["from"] = params.pop("from_")
|
||||
res = requests.get(URL_BASE, params=params).json()
|
||||
res = requests.get(URL_BASE, params=params, timeout=10).json()
|
||||
return str(res["amount"]) if res["error"] == 0 else res["error_message"]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user