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
@@ -228,10 +228,17 @@ class SniperDetector:
for entry in entries:
# Normalize market ID to 0-1 range
market_hash = (
int(hashlib.md5( # noqa: S324
entry.market_id.encode()
).hexdigest()[:8], 16) % 1000
) / 1000.0
(
int(
hashlib.md5( # noqa: S324
entry.market_id.encode()
).hexdigest()[:8],
16,
)
% 1000
)
/ 1000.0
)
# Normalize entry delta to hours (0-5 mins = 0-0.083 hours)
delta_hours = entry.entry_delta_seconds / 3600.0
@@ -415,11 +422,7 @@ class SniperDetector:
overlap_factor = min(1.0, markets_common / 5.0)
# Weighted combination
confidence = (
0.3 * size_factor +
0.4 * speed_factor +
0.3 * overlap_factor
)
confidence = 0.3 * size_factor + 0.4 * speed_factor + 0.3 * overlap_factor
return round(min(1.0, confidence), 3)