Skip to content

Commit

Permalink
Lint repo to latest ruff rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Dec 6, 2023
1 parent 58c2c90 commit e4f620d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quackstack/colors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from colorsys import hls_to_rgb, rgb_to_hls
from itertools import starmap
from random import Random
from typing import NamedTuple

Expand Down Expand Up @@ -49,7 +50,7 @@ def make_duck_colors(random: Random) -> DuckyColors:
# Shift the hue of the beck
beak = (beak[0] + .1 % 1, beak[1], beak[2])

scalar_colors = [hls_to_rgb(*color_pair) for color_pair in (eye_main, eye_wing, wing, body, beak)]
scalar_colors = list(starmap(hls_to_rgb, (eye_main, eye_wing, wing, body, beak)))
colors = (tuple(int(color * 256) for color in color_pair) for color_pair in scalar_colors)

return DuckyColors(*colors)
Expand Down

0 comments on commit e4f620d

Please sign in to comment.