Spaces:
Running
Running
Vinh Nguyen
commited on
Commit
•
6f72d86
1
Parent(s):
91d4c2f
Create ruff.toml
Browse files
ruff.toml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Exclude a variety of commonly ignored directories.
|
2 |
+
exclude = [
|
3 |
+
".bzr",
|
4 |
+
".direnv",
|
5 |
+
".eggs",
|
6 |
+
".git",
|
7 |
+
".git-rewrite",
|
8 |
+
".hg",
|
9 |
+
".ipynb_checkpoints",
|
10 |
+
".mypy_cache",
|
11 |
+
".nox",
|
12 |
+
".pants.d",
|
13 |
+
".pyenv",
|
14 |
+
".pytest_cache",
|
15 |
+
".pytype",
|
16 |
+
".ruff_cache",
|
17 |
+
".svn",
|
18 |
+
".tox",
|
19 |
+
".venv",
|
20 |
+
".vscode",
|
21 |
+
"__pypackages__",
|
22 |
+
"_build",
|
23 |
+
"buck-out",
|
24 |
+
"build",
|
25 |
+
"dist",
|
26 |
+
"node_modules",
|
27 |
+
"site-packages",
|
28 |
+
"venv",
|
29 |
+
]
|
30 |
+
|
31 |
+
# Same as Black.
|
32 |
+
line-length = 88
|
33 |
+
indent-width = 4
|
34 |
+
|
35 |
+
# Assume Python 3.8
|
36 |
+
target-version = "py38"
|
37 |
+
|
38 |
+
[lint]
|
39 |
+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
40 |
+
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
41 |
+
# McCabe complexity (`C901`) by default.
|
42 |
+
select = ["E4", "E7", "E9", "F"]
|
43 |
+
ignore = []
|
44 |
+
|
45 |
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
46 |
+
fixable = ["ALL"]
|
47 |
+
unfixable = []
|
48 |
+
|
49 |
+
# Allow unused variables when underscore-prefixed.
|
50 |
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
51 |
+
|
52 |
+
[format]
|
53 |
+
# Like Black, use double quotes for strings.
|
54 |
+
quote-style = "double"
|
55 |
+
|
56 |
+
# Like Black, indent with spaces, rather than tabs.
|
57 |
+
indent-style = "space"
|
58 |
+
|
59 |
+
# Like Black, respect magic trailing commas.
|
60 |
+
skip-magic-trailing-comma = false
|
61 |
+
|
62 |
+
# Like Black, automatically detect the appropriate line ending.
|
63 |
+
line-ending = "auto"
|
64 |
+
|
65 |
+
# Enable auto-formatting of code examples in docstrings. Markdown,
|
66 |
+
# reStructuredText code/literal blocks and doctests are all supported.
|
67 |
+
#
|
68 |
+
# This is currently disabled by default, but it is planned for this
|
69 |
+
# to be opt-out in the future.
|
70 |
+
docstring-code-format = false
|
71 |
+
|
72 |
+
# Set the line length limit used when formatting code snippets in
|
73 |
+
# docstrings.
|
74 |
+
#
|
75 |
+
# This only has an effect when the `docstring-code-format` setting is
|
76 |
+
# enabled.
|
77 |
+
docstring-code-line-length = "dynamic"
|