-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (87 loc) · 1.64 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (87 loc) · 1.64 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[tool.black]
line-length = 88
target-version = ['py310']
exclude = '''
(
/(
| _build # Exclude common directories
| \.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| buck-out
| build
| dist
| venv # Exclude venv directory
)/
)
'''
[tool.ruff]
# Exclude directories
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"nbs", # Exclude notebooks folder
"__pycache__",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.8+
target-version = "py38"
[tool.ruff.lint]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# Plus additional useful rules
ignore = ["E501", "E203","F403","F405"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*.py" = [
"S101",
"PLR2004",
"TID252",
]
# Flake8 configuration for compatibility
[tool.flake8]
max-line-length = 88
extend-ignore = [
"E203", # whitespace before ':'
"E501", # line too long (handled by ruff/black)
"W503", # line break before binary operator
]
exclude = [
".git",
"__pycache__",
"build",
"dist",
"*.egg-info",
".venv",
"venv",
"nbs", # Exclude notebooks folder
]
per-file-ignores = [
"__init__.py:F401", # Allow unused imports in __init__.py
]