fix: resolve linting and formatting issues for CI

- Use contextlib.suppress instead of try/except/pass (SIM105)
- Prefix unused fixture arguments with underscore (ARG002)
- Replace asyncio.TimeoutError with TimeoutError (UP041)
- Apply ruff formatting to all files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Patrick Selamy
2026-01-04 17:09:14 -05:00
co-authored by Claude Opus 4.5
parent a15086688a
commit 1f4f1fa557
31 changed files with 180 additions and 311 deletions
@@ -1,5 +1,6 @@
"""Data models for the ingestor module."""
import contextlib
from dataclasses import dataclass, field
from datetime import UTC, datetime
from decimal import Decimal
@@ -46,10 +47,8 @@ class Market:
end_date = None
end_date_iso = data.get("end_date_iso")
if end_date_iso:
try:
with contextlib.suppress(ValueError, AttributeError):
end_date = datetime.fromisoformat(end_date_iso.replace("Z", "+00:00"))
except (ValueError, AttributeError):
pass
return cls(
condition_id=str(data["condition_id"]),
@@ -466,10 +465,8 @@ class MarketMetadata:
end_date = None
end_date_str = data.get("end_date")
if end_date_str:
try:
with contextlib.suppress(ValueError, AttributeError):
end_date = datetime.fromisoformat(end_date_str)
except (ValueError, AttributeError):
pass
last_updated_str = data.get("last_updated")
if last_updated_str: