-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
64 lines (56 loc) · 1.95 KB
/
pyproject.toml
File metadata and controls
64 lines (56 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[tool.mypy]
strict = true
warn_return_any = true
warn_unused_configs = false # mypy runs in 4 separate invocations; not all overrides apply to each
explicit_package_bases = true
[[tool.mypy.overrides]]
module = "httpx"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "cli"
ignore_errors = true
[[tool.mypy.overrides]]
module = "cli.test_webhook"
disallow_untyped_defs = false
disallow_untyped_calls = false
[tool.pytest.ini_options]
testpaths = ["services/shared", "services/debug", "services/relay_core", "services/relays"]
norecursedirs = ["tests/e2e"]
addopts = "--import-mode=importlib"
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["services/shared", "services/debug", "services/relay_core", "services/relays", "cli", "types/python"]
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = [
"F", # Pyflakes (unused imports, undefined names, etc.)
"E", # pycodestyle errors
"E261", # too few spaces before inline comment (preview rule)
"W", # pycodestyle warnings
"I", # isort (import ordering)
"UP", # pyupgrade (modernize syntax for target Python)
"B", # flake8-bugbear (common pitfalls)
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
"PGH003", # Blanket type: ignore without error code
"S101", # No assert in production code (stripped by python -O)
]
ignore = [
"E501", # line length — handled by formatter, not linter
"UP042", # str+Enum → StrEnum — keep explicit inheritance for Pydantic model clarity
]
[tool.ruff.lint.per-file-ignores]
# CLI scripts use conditional imports and have looser style
"cli/*.py" = ["E402", "F401", "RUF005"]
"cli/core/*.py" = ["E402", "RUF005"]
# Test files are allowed to use assert
"**/test_*.py" = ["S101"]
"**/conftest.py" = ["S101"]
"**/tests/**" = ["S101"]
[tool.ruff.lint.isort]
known-first-party = [
"shared", "debug",
"relay_core", "relay_models", "relays", "relayport_types",
]