Skip to content

Commit a681d4a

Browse files
authored
chore: simplify ruff configuration (#58)
1 parent d36fb72 commit a681d4a

1 file changed

Lines changed: 17 additions & 88 deletions

File tree

ruff.toml

Lines changed: 17 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,23 @@
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.
321
line-length = 100
33-
indent-width = 4
34-
35-
# Assume Python 3.8
362
target-version = "py38"
373

384
[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.
425
select = ["ALL"]
436
ignore = [
44-
"D100",
45-
"D101",
46-
"D102",
47-
"D103",
48-
"D104",
49-
"D105",
50-
"D106",
51-
"D107",
52-
"D203",
53-
"D212",
54-
"TC001",
55-
"COM812",
56-
"ISC001",
57-
"D205",
58-
"PLR2004",
59-
"PLR0913",
60-
]
61-
62-
# Allow fix for all enabled rules (when `--fix`) is provided.
63-
fixable = ["ALL"]
64-
unfixable = []
65-
66-
# Allow unused variables when underscore-prefixed.
67-
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
68-
69-
[format]
70-
# Like Black, use double quotes for strings.
71-
quote-style = "double"
72-
73-
# Like Black, indent with spaces, rather than tabs.
74-
indent-style = "space"
75-
76-
# Like Black, respect magic trailing commas.
77-
skip-magic-trailing-comma = false
78-
79-
# Like Black, automatically detect the appropriate line ending.
80-
line-ending = "lf"
81-
82-
# Enable auto-formatting of code examples in docstrings. Markdown,
83-
# reStructuredText code/literal blocks and doctests are all supported.
84-
#
85-
# This is currently disabled by default, but it is planned for this
86-
# to be opt-out in the future.
87-
docstring-code-format = false
88-
89-
# Set the line length limit used when formatting code snippets in
90-
# docstrings.
91-
#
92-
# This only has an effect when the `docstring-code-format` setting is
93-
# enabled.
94-
docstring-code-line-length = "dynamic"
7+
"COM812", # Trailing comma conflicts with formatter
8+
"D100", # Missing docstring in public module
9+
"D101", # Missing docstring in public class
10+
"D102", # Missing docstring in public method
11+
"D103", # Missing docstring in public function
12+
"D104", # Missing docstring in public package
13+
"D105", # Missing docstring in magic method
14+
"D106", # Missing docstring in nested class
15+
"D107", # Missing docstring in __init__
16+
"D203", # One-blank-line-before-class (conflicts with D211)
17+
"D205", # Blank line between summary and description
18+
"D212", # Multi-line summary should start at first line
19+
"ISC001", # Implicit string concatenation (formatter compatibility)
20+
"PLR0913", # Too many arguments
21+
"PLR2004", # Magic value comparison
22+
"TC001", # Move application import into TYPE_CHECKING block
23+
]

0 commit comments

Comments
 (0)