Enable PIE in flake8 and ruff

This commit is contained in:
Alexander Hess 2026-11-30 23:40:15 +01:00
commit e612e33f59
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -106,6 +106,7 @@ dev = [
"flake8-executable (>=2.1.3,<3.0.0)",
"flake8-implicit-str-concat (>=0.7.0,<0.8.0)",
"flake8-logging (>=1.8.0,<2.0.0)",
"flake8-pie (>=0.16.0,<0.17.0)",
"flake8-pyproject (>=1.2.4,<2.0.0)",
"flake8-pytest-style (>=2.2.0,<3.0.0)",
"flake8-quotes (>=3.4.0,<4.0.0)",
@ -238,6 +239,8 @@ select = [
"ISC",
# flake8-logging => Correct use of `logging`
"LOG",
# flake8-pie => No unnecessary constructs
"PIE",
# flake8-pytest-style => Enforce a consistent style with pytest
"PT0",
# flake8-quotes => Use double quotes everywhere (complying with black)
@ -307,6 +310,8 @@ extend-ignore = [
"FBT003",
# Every `.add()` looks like `pandas` to this rule (`ruff` omits it).
"PD005",
# `len()` is needed for `pandas` objects, as their truth value is ambiguous.
"PIE787",
# Let's not do `@pytest.mark.no_cover()` instead of `@pytest.mark.no_cover`.
"PT023",
# `ruff`'s RET504 does this better, as it allows statements in between.
@ -546,6 +551,8 @@ select = [
"N",
# pandas-vet => Idiomatic `pandas`
"PD",
# flake8-pie => No unnecessary constructs
"PIE",
# flake8-pytest-style => Enforce a consistent style with pytest
"PT",
# flake8-quotes => Use double quotes everywhere