-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
55 lines (48 loc) · 1.09 KB
/
pyproject.toml
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
[tool.mypy]
python_version = "3.11"
disallow_untyped_defs = false
ignore_missing_imports = true
show_error_codes = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
check_untyped_defs = true
no_implicit_optional = true
warn_unused_configs = true
[tool.ruff]
# Basic settings
line-length = 88
target-version = "py311"
# Exclude directories
exclude = [
".git",
"__pycache__",
"build",
"dist",
"venv",
]
# Enable additional rules
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
]
# Similar to Flake8's ignore list
ignore = [
"E203", # Whitespace before ':'
"E266", # Too many leading '#' for block comment
"E501", # Line too long (handled by line-length)
"F405", # Unused import
]
# Allow unused imports in __init__.py files
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
# isort settings (now handled by Ruff)
[tool.ruff.isort]
combine-as-imports = true
force-wrap-aliases = true
# Maximum McCabe complexity
[tool.ruff.mccabe]
max-complexity = 10