chore(V2): cleanup quality gate
- ruff: contextlib.suppress al posto di try/except/pass (client_registry, test_env_routing) - rimozione services/ legacy (residuo da git rm) - fix integration test fixture: rimosso sys.modules.pop che inquinava module references nei test successivi (test_audit, test_client_init_default_http) 254 test passano. Ruff: clean. Mypy: 68 warning preesistenti dal codice V1 migrato (strict=false). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,8 @@ async def test_build_client_deribit_returns_correct_url(monkeypatch):
|
||||
for k, v in _minimal_env().items():
|
||||
monkeypatch.setenv(k, v)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "deribit", "testnet")
|
||||
@@ -38,8 +38,8 @@ async def test_build_client_bybit_returns_correct_env(monkeypatch):
|
||||
|
||||
monkeypatch.setattr(bybit_client, "HTTP", _FakeHTTP)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "bybit", "testnet")
|
||||
@@ -57,8 +57,8 @@ async def test_build_client_hyperliquid_returns_correct_env(monkeypatch):
|
||||
for k, v in _minimal_env().items():
|
||||
monkeypatch.setenv(k, v)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "hyperliquid", "testnet")
|
||||
@@ -90,8 +90,8 @@ async def test_build_client_alpaca_returns_correct_env(monkeypatch):
|
||||
monkeypatch.setattr(alpaca_client, "CryptoHistoricalDataClient", _FakeSdk)
|
||||
monkeypatch.setattr(alpaca_client, "OptionHistoricalDataClient", _FakeSdk)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "alpaca", "testnet")
|
||||
@@ -109,9 +109,9 @@ async def test_build_client_macro_no_env_distinction(monkeypatch):
|
||||
for k, v in _minimal_env().items():
|
||||
monkeypatch.setenv(k, v)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.exchanges.macro.client import MacroClient
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "macro", "testnet")
|
||||
@@ -132,9 +132,9 @@ async def test_build_client_sentiment_no_env_distinction(monkeypatch):
|
||||
for k, v in _minimal_env().items():
|
||||
monkeypatch.setenv(k, v)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.exchanges.sentiment.client import SentimentClient
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
c_test = await build_client(s, "sentiment", "testnet")
|
||||
@@ -155,8 +155,8 @@ async def test_build_client_unknown_exchange_raises(monkeypatch):
|
||||
for k, v in _minimal_env().items():
|
||||
monkeypatch.setenv(k, v)
|
||||
|
||||
from cerbero_mcp.settings import Settings
|
||||
from cerbero_mcp.exchanges import build_client
|
||||
from cerbero_mcp.settings import Settings
|
||||
|
||||
s = Settings()
|
||||
with pytest.raises(ValueError):
|
||||
|
||||
Reference in New Issue
Block a user