Enable the entire PERF category in Ruff

This commit is contained in:
Adam Turner 2024-10-19 00:29:09 +01:00
parent 8351d0f57e
commit 0d7ba8faa6

View File

@ -32,6 +32,8 @@ ignore = [
# refurb
"FURB101", # `open` and `read` should be replaced by `Path(...).read_text(...)`
"FURB103", # `open` and `write` should be replaced by `Path(...).write_text(...)`
# perflint
"PERF203", # `try`-`except` within a loop incurs performance overhead
# pylint
"PLC1901", # simplify truthy/falsey string comparisons
# flake8-simplify
@ -159,12 +161,7 @@ select = [
# pandas-vet ('PD')
# Pandas is not used in Sphinx
# perflint ('PERF')
"PERF101", # Do not cast an iterable to `list` before iterating over it
"PERF102", # When using only the {subset} of a dict use the `{subset}()` method
# "PERF203", # `try`-`except` within a loop incurs performance overhead
"PERF401", # Use a list comprehension to create a transformed list
"PERF402", # Use `list` or `list.copy` to create a copy of a list
"PERF403", # Use a dictionary comprehension instead of a for-loop
"PERF",
# pygrep-hooks ('PGH')
"PGH",
# flake8-pie ('PIE')