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
|
[tool.ruff]
line-length = 127
target-version = "py37"
extend-exclude = ["circuits/web/parsers/multipart.py"]
[tool.ruff.lint]
preview = true
ignore-init-module-imports = true
select = ["E", "W", "F", "I", "D", "TD"]
ignore = [
"E501", # line-too-long
"E203", # whitespace-before-punctuation
"COM812", # missing-trailing-comma
"D203", # one-blank-line-before-class
"D212", # multi-line-summary-first-line
"D400", # ends-in-period
"D415", # ends-in-punctuation
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D101", # Missing docstring in public class
"D100", # Missing docstring in public module
"D107", # Missing docstring in `__init__`
"D205", # 1 blank line required between summary line and description
"D105", # Missing docstring in magic method
"D401", # First line of docstring should be in imperative mood: "A shortcut to abspath, escape and lowercase."
"D402", # First line should not be the function's signature
"D404", # First word of the docstring should not be "This"
"D104", # Missing docstring in public package
"T201", "T203", # print, p-print
"TD001", # invalid-todo-tag
"TD002", # missing-todo-author
"TD003", # missing-todo-link
]
# Exclude a variety of commonly ignored directories.
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]+?))$"
task-tags = ["TODO", "FIXME"]
[tool.ruff.lint.mccabe]
max-complexity = 40
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
inline-quotes = "single"
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint.isort]
combine-as-imports = true
#filter-files = true
#force-grid-wrap = false
known-first-party = ["circuits"]
# https://github.com/astral-sh/ruff/issues/2600 :
#multi-line-output = 5
#include-trailing-comma = true
lines-after-imports = 2
#skip = ".tox,docs,circuits/web/parsers/multipart.py"
#skip-glob = "venv/*"
split-on-trailing-comma = false
|