Skip to content

Commit 3f75733

Browse files
committed
fix: parenthesize multi-catch that only parses on 3.14
PEP 758 syntax requires Python 3.14, but the script metadata declares requires-python >= 3.11. Reported by ty check run per #15187.
1 parent 215c1f0 commit 3f75733

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎web_programming/crypto_price_tracker.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def crypto_price(coin: str = "bitcoin") -> float:
2424
url = f"https://api.coingecko.com/api/v3/simple/price?ids={coin}&vs_currencies=usd"
2525
try:
2626
json_response = httpx2.get(url, timeout=10).raise_for_status().json()
27-
except httpx2.RequestError, ValueError, KeyError:
27+
except (httpx2.RequestError, ValueError, KeyError):
2828
return 0.0
2929
return float(json_response.get(coin, {}).get("usd", 0.0))
3030

0 commit comments

Comments
 (0)