Skip to content

Commit

Permalink
silence mypy checker error
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Feb 22, 2024
1 parent bdd6daa commit 6ecd7a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anim.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
def _speed_to_color(speed: float, min_speed: float, max_speed: float) -> str:
"""Map a speed value to a color using a colormap."""
normalized_speed = (speed - min_speed) / (max_speed - min_speed)
r, g, b = plt.cm.jet_r(normalized_speed)[:3]
r, g, b = plt.cm.jet_r(normalized_speed)[:3] # type: ignore
return f"rgba({r*255:.0f}, {g*255:.0f}, {b*255:.0f}, 0.5)"


Expand Down

0 comments on commit 6ecd7a6

Please sign in to comment.