Enable PERF in ruff
This commit is contained in:
parent
9cc21f5b69
commit
0a4fd0edbc
2 changed files with 5 additions and 3 deletions
|
|
@ -243,6 +243,8 @@ select = [
|
||||||
# ========================================
|
# ========================================
|
||||||
# `ruff` only (no working `flake8` plugin)
|
# `ruff` only (no working `flake8` plugin)
|
||||||
# ========================================
|
# ========================================
|
||||||
|
# Perflint => No performance anti-patterns
|
||||||
|
# "PERF",
|
||||||
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
||||||
# "PTH",
|
# "PTH",
|
||||||
# pyupgrade => Modern syntax for the targeted Python version
|
# pyupgrade => Modern syntax for the targeted Python version
|
||||||
|
|
@ -513,6 +515,8 @@ select = [
|
||||||
"I",
|
"I",
|
||||||
# flake8-import-conventions => Unified import aliases
|
# flake8-import-conventions => Unified import aliases
|
||||||
"ICN",
|
"ICN",
|
||||||
|
# Perflint => No performance anti-patterns
|
||||||
|
"PERF",
|
||||||
# Pylint's refactoring rules => simpler and smaller functions
|
# Pylint's refactoring rules => simpler and smaller functions
|
||||||
"PLR",
|
"PLR",
|
||||||
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
# flake8-use-pathlib => `pathlib` instead of `os` functions
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,7 @@ def make_random_cmap(
|
||||||
for _ in range(n_colors)
|
for _ in range(n_colors)
|
||||||
]
|
]
|
||||||
|
|
||||||
rgb_colors = []
|
rgb_colors = [colorsys.hsv_to_rgb(*color) for color in hsv_colors]
|
||||||
for color in hsv_colors:
|
|
||||||
rgb_colors.append(colorsys.hsv_to_rgb(*color))
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
low = 0.0
|
low = 0.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue