9da2e12473
- 24 autofix safe (SIM105 contextlib.suppress, F401 unused imports, I001 import order, B007 unused loop var, F811 redef, F841 unused). - 15 unsafe-fix (UP038 X|Y in isinstance, SIM108 ternary, ecc.). - Manual fix: SIM102 nested if in deribit term_structure, E402 imports in test_cot.py + sentiment server.py. - Ignore E741 (variabili 'l' in list comprehensions deribit/client.py — stilistico, non bug). Tests: 478/478 verdi.
81 lines
1.6 KiB
TOML
81 lines
1.6 KiB
TOML
[tool.uv.workspace]
|
|
members = [
|
|
"services/common",
|
|
"services/mcp-alpaca",
|
|
"services/mcp-bybit",
|
|
"services/mcp-deribit",
|
|
"services/mcp-hyperliquid",
|
|
"services/mcp-macro",
|
|
"services/mcp-sentiment",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py313"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "W", "UP", "B", "SIM"]
|
|
ignore = ["E501", "E741"]
|
|
|
|
[tool.ruff.lint.flake8-bugbear]
|
|
extend-immutable-calls = [
|
|
"fastapi.Depends",
|
|
"fastapi.Query",
|
|
"fastapi.Body",
|
|
"fastapi.Header",
|
|
"fastapi.Path",
|
|
"fastapi.Cookie",
|
|
"fastapi.Form",
|
|
"fastapi.File",
|
|
"fastapi.Security",
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"**/test_*.py" = ["B008"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["services"]
|
|
addopts = "--import-mode=importlib"
|
|
consider_namespace_packages = true
|
|
|
|
[tool.mypy]
|
|
python_version = "3.13"
|
|
strict = false
|
|
warn_return_any = true
|
|
warn_unused_ignores = true
|
|
warn_redundant_casts = true
|
|
check_untyped_defs = true
|
|
ignore_missing_imports = true
|
|
mypy_path = [
|
|
"services/common/src",
|
|
"services/mcp-alpaca/src",
|
|
"services/mcp-bybit/src",
|
|
"services/mcp-deribit/src",
|
|
"services/mcp-hyperliquid/src",
|
|
"services/mcp-macro/src",
|
|
"services/mcp-sentiment/src",
|
|
]
|
|
exclude = [
|
|
"^.*tests/.*$",
|
|
"^.venv/.*$",
|
|
]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"pybit.*",
|
|
"alpaca.*",
|
|
"hyperliquid.*",
|
|
"pythonjsonlogger.*",
|
|
]
|
|
ignore_missing_imports = true
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.0.3",
|
|
"pytest-asyncio>=1.3.0",
|
|
"pytest-httpx>=0.36.2",
|
|
"mypy>=1.13",
|
|
"ruff>=0.5,<0.6",
|
|
]
|