-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
114 lines (98 loc) · 2.63 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
omit = [
"*test/*",
]
[tool.ruff]
target-version = "py39"
line-length = 100
src = ["libs/*"]
select = [
"E", # Pycodestyle errors
"W", # Pycodestyle warnings
"F", # Pyflakes
"UP", # Pyupgrade
"S", # Bandit (security),
"B", # Bugbear
"C4", # Comprehensions
"ISC", # Implicit string concat
"ICN", # Import conventions
"I001", # isort
"Q", # Quotes
"SIM", # Simplify
"ERA", # eradicate (commented out code)
"PIE",
"PD", # Pandas
"PLC",
"PLE",
"PLR",
"PLW", # Pylint extensions
"RET", # Return statements
]
# Never enforce these
ignore = [
"E731", # Do not assign a lambda expression, use a def
"E741", # Ambiguous variable names, e.g. l/1, O/0. Just use appropriate font.
"D", # All docstrings for now.
"S101", # Don't warn for asserts in pytest
"S105", # HardcodedPasswordString
"S106", # HardcodedPasswordFuncArg
"S107", # HardcodedPasswordDefault
"PD901", # df as variable name
"PD011", # Use .to_numpy() instead of .values
"PD015", # Use .merge instead of pd.merge
"PLR0913", # Too many arguments (in function signatures)
"RET501", # explicit `return None` if only possible return value
"RET504", # Unnecessary variable assignment before `return` statement
"SIM108", # Ternary instead of if/else (doesn't take into account line length)
]
# Never try to fix these
unfixable = [
"ERA001", # Don't automatically delete commented out code
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.per-file-ignores]
# "__init__.py" = ["E402"]
# "test/" = ["S101"] # Don't warn for asserts in pytest, doesn't work for paths
[tool.ruff.flake8-annotations]
mypy-init-return = true
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.flake8-import-conventions]
[tool.ruff.flake8-import-conventions.extend-aliases]
"dask.dataframe" = "dd"
"pyarrow" = "pa"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.isort]
known-first-party = ["lector"]
[tool.ruff.flake8-bugbear]
extend-immutable-calls = ["typer.Option"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"