Skip to content

Commit

Permalink
fix SIM108
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Oct 11, 2024
1 parent 53fd1f5 commit 6044ecb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
line-length = 120
line-length = 88

[tool.ruff.lint]
select = [
Expand Down
9 changes: 5 additions & 4 deletions ttls/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,11 @@ async def set_cycle_colours(
elif isinstance(colour, Tuple):
sequence = [colour]
elif isinstance(colour, list):
if isinstance(colour[0], TwinklyColour):
sequence = [c.as_twinkly_tuple() for c in colour]
else:
sequence = colour
sequence = (
[c.as_twinkly_tuple() for c in colour]
if isinstance(colour[0], TwinklyColour)
else colour
)
else:
raise TypeError("Unknown colour format")
frame = list(islice(cycle(sequence), self.length))
Expand Down

0 comments on commit 6044ecb

Please sign in to comment.