Enable more lint rules #10

Merged
alexander merged 31 commits from more-lint-rules into develop 2026-11-30 23:59:09 +01:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 0a4fd0edbc - Show all commits

Enable PERF in ruff

Alexander Hess 2026-11-30 21:31:38 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -243,6 +243,8 @@ select = [
# ========================================
# `ruff` only (no working `flake8` plugin)
# ========================================
# Perflint => No performance anti-patterns
# "PERF",
# flake8-use-pathlib => `pathlib` instead of `os` functions
# "PTH",
# pyupgrade => Modern syntax for the targeted Python version
@ -513,6 +515,8 @@ select = [
"I",
# flake8-import-conventions => Unified import aliases
"ICN",
# Perflint => No performance anti-patterns
"PERF",
# Pylint's refactoring rules => simpler and smaller functions
"PLR",
# flake8-use-pathlib => `pathlib` instead of `os` functions

View file

@ -31,9 +31,7 @@ def make_random_cmap(
for _ in range(n_colors)
]
rgb_colors = []
for color in hsv_colors:
rgb_colors.append(colorsys.hsv_to_rgb(*color))
rgb_colors = [colorsys.hsv_to_rgb(*color) for color in hsv_colors]
else:
low = 0.0