From fc45791da48d363900a202388ffed68d6d705ded Mon Sep 17 00:00:00 2001 From: boxydog Date: Fri, 31 May 2024 10:41:09 -0500 Subject: [PATCH] Fix or ignore ruff T201, RUF001, PLR2004, B904, SLOT000, PYI024, PIE800 --- pyproject.toml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 606a05ba..ccd75f9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,11 +168,8 @@ select = [ ignore = [ # suppression in order of # of violations in Dec 2023: - "T201", # print "PLW2901", # redefined-loop-name "SLF001", # private-member-access - "RUF001", # ambiguous-unicode-character-string - "PLR2004", # magic-value-comparison "PLR0912", # too-many-branches "PLR0913", # too-many-arguments # RUF005: this is a different style of concatenating literals. It perhaps performs @@ -193,15 +190,10 @@ ignore = [ # either by removing them from the `select` or `extend-select` configuration, # or adding them to the `ignore` configuration." "ISC001", # single-line-implicit-string-concatenation - "B904", # raise-without-from-inside-except "UP031", # printf-string-formatting # PERF203 has minimal performance impact, and you have to catch the exception # inside the loop if you want to ignore it, so let's ignore PERF203. "PERF203", # try-except-in-loop - # TODO: these only have one violation each in Dec 2023: - "SLOT000", # no-slots-in-str-subclass - "PYI024", # collections-named-tuple - "PIE800", # unnecessary-spread ] [tool.ruff.lint.extend-per-file-ignores] @@ -210,3 +202,16 @@ ignore = [ # allow imports after a call to a function, see the file "E402" ] +"pelican/tests/test_utils.py" = [ + # the tests have a bunch of unicode characters + "RUF001" +] +"pelican/tests/test_generators.py" = [ + # the tests have a bunch of constants, why not + "PLR2004" +] + +"pelican/tools/*.py}" = [ + # this is a command-line utility, prints are fine + "T201" +]