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
+4 -6
View File
@@ -115,25 +115,23 @@ class TestClobClient:
@pytest.fixture
def mock_base_client(self) -> MagicMock:
"""Create a mock base CLOB client."""
with patch(
"polymarket_insider_tracker.ingestor.clob_client.BaseClobClient"
) as mock:
with patch("polymarket_insider_tracker.ingestor.clob_client.BaseClobClient") as mock:
yield mock.return_value
def test_init_defaults(self, mock_base_client: MagicMock) -> None:
def test_init_defaults(self, _mock_base_client: MagicMock) -> None:
"""Test client initialization with defaults."""
client = ClobClient()
assert client._host == "https://clob.polymarket.com"
assert client._max_retries == 3
def test_init_with_env_api_key(self, mock_base_client: MagicMock) -> None:
def test_init_with_env_api_key(self, _mock_base_client: MagicMock) -> None:
"""Test client reads API key from environment."""
with patch.dict("os.environ", {"POLYMARKET_API_KEY": "test-key"}):
client = ClobClient()
assert client._api_key == "test-key"
def test_init_with_explicit_api_key(self, mock_base_client: MagicMock) -> None:
def test_init_with_explicit_api_key(self, _mock_base_client: MagicMock) -> None:
"""Test client uses explicitly provided API key."""
client = ClobClient(api_key="explicit-key")
assert client._api_key == "explicit-key"