@@ -21,7 +21,7 @@ def default_plotly_template() -> go.layout.Template:
2121# once we add support for color sequences.
2222def infer_default_color_sequence () -> Collection [Color ]: # pragma: no cover
2323 return cast (
24- Collection [Color ], default_plotly_template ().layout .colorway or px .colors .qualitative .D3
24+ " Collection[Color]" , default_plotly_template ().layout .colorway or px .colors .qualitative .D3
2525 )
2626
2727
@@ -32,7 +32,7 @@ def to_rgb(color: Color) -> str:
3232 r , g , b = color
3333 rgb = f"rgb({ r } , { g } , { b } )"
3434 elif color .startswith ("#" ):
35- return to_rgb (cast (str , px .colors .hex_to_rgb (color )))
35+ return to_rgb (cast (" str" , px .colors .hex_to_rgb (color )))
3636 elif color .startswith (("rgb(" , "rgba(" )):
3737 rgb = color
3838 elif color in CSS_NAMED_COLORS :
@@ -50,7 +50,7 @@ def unpack_rgb(rgb: str) -> tuple[float, float, float, float] | tuple[float, flo
5050 prefix = rgb .split ("(" )[0 ] + "("
5151 values_str = map (str .strip , rgb .removeprefix (prefix ).removesuffix (")" ).split ("," ))
5252 values_num = tuple (int (v ) if v .isdecimal () else float (v ) for v in values_str )
53- return cast (Union [tuple [float , float , float , float ], tuple [float , float , float ]], values_num )
53+ return cast (" Union[tuple[float, float, float, float], tuple[float, float, float]]" , values_num )
5454
5555
5656def apply_alpha (color : Color , alpha : float ) -> str :
0 commit comments