@@ -3,30 +3,12 @@ target-version = "py312"
33
44# Max line length (matches Black's default)
55line-length = 88
6+ indent-width = 4
67
7- # Exclude a variety of commonly ignored directories.
8- exclude = [
9- " .direnv" ,
10- " .eggs" ,
11- " .git" ,
12- " .mypy_cache" ,
13- " .nox" ,
14- " .pants.d" ,
15- " .pyenv" ,
16- " .pytest_cache" ,
17- " .pytype" ,
18- " .ruff_cache" ,
19- " .svn" ,
20- " .tox" ,
21- " .venv" ,
22- " .vscode" ,
23- " __pypackages__" ,
24- " _build" ,
25- " build" ,
8+ # Amend exclude list in addtion to "exclude".
9+ # See https://docs.astral.sh/ruff/configuration/
10+ extend-exclude = [
2611 " contrib" ,
27- " dist" ,
28- " site-packages" ,
29- " venv" ,
3012]
3113
3214
@@ -44,7 +26,6 @@ select = [
4426 " C90" , # mccabe complexity
4527 " B" , # flake8-bugbear
4628 " A" , # flake8-builtins
47- " COM" , # flake8-commas
4829 " RUF" , # Ruff-specific rules
4930]
5031
@@ -54,8 +35,7 @@ ignore = [
5435 " D107" , # Missing docstring in __init__
5536 " D203" , # Conflicts with D211 (one blank line before class docstring)
5637 " D213" , # Conflicts with D212 (multi-line docstring start convention)
57- # "D401", # First line of docstring should be in imperative mood
58- " COM812" , #
38+ " E501" , # Line too long (Let the formatter handle this)
5939]
6040
6141# Allow autofix for everything except complexity and annotations
@@ -85,17 +65,9 @@ quote-style = "double"
8565 " D301" # Use `r"""` if any backslashes in a docstring
8666]
8767"tests/**/test_*.py" = [
88- " ANN001" , # Missing type annotation for function argument
89- " ANN002" , # Missing type annotation for variable
90- " ANN003" , # Missing type annotation for class attribute
91- " ANN201" , # Missing return type annotation
92- " ANN202" , # Missing return type annotation for private function
93- " ANN204" , # Missing return type annotation for special method `__init__`
94- " ANN401" , # Missing type annotation for self in method
95- " D100" , # Missing docstring in public module
96- " D101" , # Missing docstring in public class
97- " D103" , # Missing docstring in public function
98- " D105" , # Missing docstring in magic method
68+ " ANN" , # Ignore ALL annotations in tests (simpler than listing specific codes)
69+ " D" , # Ignore ALL docstrings in tests
70+ " S101" , # (Optional) If you add flake8-bandit, this allows "assert" in tests
9971]
10072# Ignore unused imports in all __init__.py files
10173"__init__.py" = [" F401" ]
0 commit comments