Skip to content

Commit 5746650

Browse files
committed
use ruff
1 parent 12eb6ff commit 5746650

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

adafruit_fancyled/adafruit_fancyled.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class CRGB:
5555
"""
5656

5757
def __init__(self, red: CHSV, green: float = 0.0, blue: float = 0.0) -> None:
58-
# pylint: disable=too-many-branches
5958
if isinstance(red, CHSV):
6059
# If first/only argument is a CHSV type, perform HSV to RGB
6160
# conversion.
@@ -188,7 +187,6 @@ class CHSV:
188187
HSV->RGB->HSV translations won't have the same input and output.
189188
"""
190189

191-
# pylint: disable=invalid-name
192190
def __init__(self, h: float, s: float = 1.0, v: float = 1.0) -> None:
193191
if isinstance(h, float):
194192
self.hue: float = h # Don't clamp! Hue can wrap around forever.
@@ -197,7 +195,7 @@ def __init__(self, h: float, s: float = 1.0, v: float = 1.0) -> None:
197195
self.saturation: float = clamp_norm(s)
198196
self.value: float = clamp_norm(v)
199197

200-
def __repr__( # pylint: disable=invalid-repr-returned
198+
def __repr__(
201199
self,
202200
) -> tuple[float, float, float]:
203201
return (self.hue, self.saturation, self.value)

adafruit_fancyled/fastled_helpers.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
# These are helper functions that provide more FastLED-like calls for
2626
# fancyled functions.
27-
# Function names are kept the same as FastLED, which normally upsets pylint.
28-
# Disable name-checking so this passes muster.
29-
# pylint: disable=invalid-name
3027

3128
GFACTOR = 2.5 # Default gamma-correction factor for function below
3229

@@ -144,6 +141,3 @@ def hsv2rgb_spectrum(hue, sat, val):
144141
"""
145142

146143
return fancy.CRGB(fancy.CHSV(hue / 255, sat / 255, val / 255))
147-
148-
149-
# pylint: enable=invalid-name

0 commit comments

Comments
 (0)