Skip to content

Commit 905227e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ffbd9cd commit 905227e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

colour_visuals/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111

112112
try:
113113
_version: str = (
114-
subprocess.check_output( # noqa: S603
114+
subprocess.check_output(
115115
["git", "describe"], # noqa: S607
116116
cwd=os.path.dirname(__file__),
117117
stderr=subprocess.STDOUT,

colour_visuals/diagrams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def labels(self, value: Sequence | None) -> None:
218218
"""Setter for the **self.labels** property."""
219219

220220
self._labels = cast(
221-
Sequence,
221+
"Sequence",
222222
optional(value, LABELS_CHROMATICITY_DIAGRAM_DEFAULT[self._method]),
223223
)
224224

colour_visuals/planckian_locus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def labels(self, value: Sequence | None) -> None:
183183
"""Setter for the **self.labels** property."""
184184

185185
self._labels = cast(
186-
Sequence,
186+
"Sequence",
187187
optional(
188188
value,
189189
LABELS_PLANCKIAN_LOCUS_DEFAULT["Mireds" if self._mireds else "Default"],
@@ -303,7 +303,7 @@ def update(self) -> None:
303303

304304
text = gfx.Text(
305305
gfx.TextGeometry(
306-
f'{as_int_scalar(label)}{"M" if self._mireds else "K"}',
306+
f"{as_int_scalar(label)}{'M' if self._mireds else 'K'}",
307307
font_size=CONSTANTS_COLOUR_STYLE.font.size,
308308
screen_space=True,
309309
anchor="Bottom-Left",

colour_visuals/visual.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def cmfs(
158158
"""Setter for the **self.cmfs** property."""
159159

160160
self._cmfs = cast(
161-
MultiSpectralDistributions,
161+
"MultiSpectralDistributions",
162162
first_item(filter_cmfs(value).values()),
163163
)
164164

@@ -254,7 +254,7 @@ def colourspace(
254254
"""Setter for the **self.colourspace** property."""
255255

256256
self._colourspace = cast(
257-
RGB_Colourspace,
257+
"RGB_Colourspace",
258258
first_item(filter_RGB_colourspaces(value).values()),
259259
)
260260

@@ -304,7 +304,7 @@ def illuminant(
304304
"""Setter for the **self.illuminant** property."""
305305

306306
self._illuminant = cast(
307-
SpectralDistribution,
307+
"SpectralDistribution",
308308
first_item(filter_illuminants(value).values()),
309309
)
310310

utilities/export_todo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def extract_todo_items(root_directory: str) -> dict:
8181

8282
if in_todo and line.startswith("#"):
8383
todo_item.append(line.replace("#", "").strip())
84-
elif len(todo_item):
84+
elif todo_item:
8585
key = filename.replace("../", "")
8686
if not todo_items.get(key):
8787
todo_items[key] = []

0 commit comments

Comments
 (0)