rpdelaney/dumbpw

View on GitHub
ruff.toml

Summary

Maintainability
Test Coverage
target-version = "py312"

line-length = 79

exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "venv",
]

[lint]
select = [ "ALL" ]
ignore = [
    "ANN",      # we have mypy for this
    "D203",     # prefer D211 `no-blank-line-before-class`
    "D213",     # prefer D212 `multi-line-summary-first-line`
    "COM812",   # conflicts with black and isort precedent
    "ISC001",   # to silence ruff warning
]

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [ "ALL" ]
unfixable = [
    "F401",
    "F841",
    "F842",
    "PYI047",
    # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
    "W191",
    "E111",
    "E114",
    "E117",
    "D206",
    "D300",
    "Q000",
    "Q001",
    "Q002",
    "Q003",
    "COM812",
    "COM819",
    "ISC001",
    "ISC002",
    # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
]

[lint.per-file-ignores]
"__init__.py" = ["D104", "E402"]
"dumbpw/cli.py" = ["T201"]
"**/{tests,docs}/*" = ["ARG", "ANN", "D", "S"]

[lint.mccabe]
max-complexity = 10

[lint.isort]
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
force-single-line = false
force-wrap-aliases = false
lines-after-imports = 2
lines-between-types = 0
split-on-trailing-comma = false

[format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
exclude = ["*.pyi"]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false