fedrq/ruff.toml
gotmax23 31d4104d2b
All checks were successful
builds.sr.ht/main Job completed
builds.sr.ht/test Job completed
builds.sr.ht/epel9 Job completed
builds.sr.ht/mockbuild Job completed
lint: ignore PLR0917 (too many posargs) in tests
2026-08-17 00:17:47 +00:00

57 lines
1.5 KiB
TOML

# Copyright (C) 2023 Maxwell G <maxwell@gtmx.me>
# SPDX-License-Identifier: GPL-2.0-or-later
target-version = "py39"
src = [
"src",
"tests",
]
exclude = [
# Contains vendored code that we don't want to touch.
"src/fedrq/_compat.py"
]
[lint]
select = [
"A", # flake8-builtins
"ARG", # unused-arguments
"B", # flake8-bugbear
"E", # pycodestyle errors
"F", # pyflakes
"PL", # pylint
"PYI", # flake8-pyi
"SIM", # flake8-simplify
"W", # pycodestyle warnings
]
ignore = [
# function-call-in-default-argument
# There's nothing wrong with calling a function that returns an immutable
# object
"B008",
# `zip()` without an explicit `strict=` parameter.
# `zip()` only has that parameter in py310+
"B905",
# Allow overwriting loop variable
"PLW2901",
# Magic value used in comparison
# This is a good rule, but the checker is a bit overzealous.
"PLR2004",
# Too many arguments to function call
"PLR0913",
# Class attribute is shadowing a Python builtin
"A003",
# No explicit `stacklevel` keyword argument found
"B028",
# Line with empty comment
# I occassionally use these on purpose for sorting/formatting reasons
"PLR2044",
# `import` should be at the top-level of a file
# This is used several places on purpose.
"PLC0415",
]
[lint.extend-per-file-ignores]
# PLR0917: Too many positional arguments
"tests/*" = ["ARG", "PLR0917"]