feat: update ruff config
Browse files- pyproject.toml +49 -0
pyproject.toml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[tool.ruff]
|
2 |
+
target-version = "py310"
|
3 |
+
line-length = 80
|
4 |
+
select = [
|
5 |
+
"E", "W", # see: https://pypi.org/project/pycodestyle
|
6 |
+
"F", # see: https://pypi.org/project/pyflakes
|
7 |
+
]
|
8 |
+
ignore = [
|
9 |
+
"E402", # Module level import not at top of file, due to Chroma hacks
|
10 |
+
"E501",
|
11 |
+
"E731",
|
12 |
+
"E741", # Ambiguous variable name: ...
|
13 |
+
"E999", # SyntaxError: invalid syntax. Got unexpected token Newline
|
14 |
+
]
|
15 |
+
|
16 |
+
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
17 |
+
fixable = ["ALL"]
|
18 |
+
unfixable = []
|
19 |
+
|
20 |
+
# Exclude a variety of commonly ignored directories.
|
21 |
+
exclude = [
|
22 |
+
".bzr",
|
23 |
+
".direnv",
|
24 |
+
".eggs",
|
25 |
+
".git",
|
26 |
+
".git-rewrite",
|
27 |
+
".hg",
|
28 |
+
".mypy_cache",
|
29 |
+
".nox",
|
30 |
+
".pants.d",
|
31 |
+
".pytype",
|
32 |
+
".ruff_cache",
|
33 |
+
".svn",
|
34 |
+
".tox",
|
35 |
+
".venv",
|
36 |
+
"__pypackages__",
|
37 |
+
"_build",
|
38 |
+
"buck-out",
|
39 |
+
"build",
|
40 |
+
"dist",
|
41 |
+
"node_modules",
|
42 |
+
"venv",
|
43 |
+
]
|
44 |
+
ignore-init-module-imports = true
|
45 |
+
per-file-ignores = {}
|
46 |
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
47 |
+
|
48 |
+
[tool.ruff.mccabe]
|
49 |
+
max-complexity = 10
|