@@ -800,10 +800,10 @@ def is_valid_rgba(cls, color: AnyRgba, /, *, allow_alpha: bool = True) -> bool:
800800 and all (isinstance (val , int ) for val in array_color [:3 ])
801801 and isinstance (array_color [3 ], (float , type (None )))
802802 ):
803- return (
804- 0 <= array_color [0 ] <= 255 and 0 <= array_color [1 ] <= 255 and 0 <= array_color [2 ] <= 255
805- and (array_color [3 ] is None or 0 <= array_color [3 ] <= 1 )
806- )
803+ return (
804+ 0 <= array_color [0 ] <= 255 and 0 <= array_color [1 ] <= 255 and 0 <= array_color [2 ] <= 255
805+ and (array_color [3 ] is None or 0 <= array_color [3 ] <= 1 )
806+ )
807807 elif len (array_color ) == 3 and all (isinstance (val , int ) for val in array_color ):
808808 return 0 <= array_color [0 ] <= 255 and 0 <= array_color [1 ] <= 255 and 0 <= array_color [2 ] <= 255
809809 else :
@@ -817,10 +817,10 @@ def is_valid_rgba(cls, color: AnyRgba, /, *, allow_alpha: bool = True) -> bool:
817817 and all (isinstance (dict_color .get (ch ), int ) for ch in ("r" , "g" , "b" ))
818818 and isinstance (dict_color .get ("a" , "no alpha" ), (float , type (None )))
819819 ):
820- return (
821- 0 <= dict_color ["r" ] <= 255 and 0 <= dict_color ["g" ] <= 255 and 0 <= dict_color ["b" ] <= 255
822- and (dict_color ["a" ] is None or 0 <= dict_color ["a" ] <= 1 )
823- )
820+ return (
821+ 0 <= dict_color ["r" ] <= 255 and 0 <= dict_color ["g" ] <= 255 and 0 <= dict_color ["b" ] <= 255
822+ and (dict_color ["a" ] is None or 0 <= dict_color ["a" ] <= 1 )
823+ )
824824 elif len (dict_color ) == 3 and all (isinstance (dict_color .get (ch ), int ) for ch in ("r" , "g" , "b" )):
825825 return 0 <= dict_color ["r" ] <= 255 and 0 <= dict_color ["g" ] <= 255 and 0 <= dict_color ["b" ] <= 255
826826 else :
@@ -851,10 +851,10 @@ def is_valid_hsla(cls, color: AnyHsla, /, *, allow_alpha: bool = True) -> bool:
851851 and all (isinstance (val , int ) for val in array_color [:3 ])
852852 and isinstance (array_color [3 ], (float , type (None )))
853853 ):
854- return (
855- 0 <= array_color [0 ] <= 360 and 0 <= array_color [1 ] <= 100 and 0 <= array_color [2 ] <= 100
856- and (array_color [3 ] is None or 0 <= array_color [3 ] <= 1 )
857- )
854+ return (
855+ 0 <= array_color [0 ] <= 360 and 0 <= array_color [1 ] <= 100 and 0 <= array_color [2 ] <= 100
856+ and (array_color [3 ] is None or 0 <= array_color [3 ] <= 1 )
857+ )
858858 elif len (array_color ) == 3 and all (isinstance (val , int ) for val in array_color ):
859859 return 0 <= array_color [0 ] <= 360 and 0 <= array_color [1 ] <= 100 and 0 <= array_color [2 ] <= 100
860860 else :
@@ -868,10 +868,10 @@ def is_valid_hsla(cls, color: AnyHsla, /, *, allow_alpha: bool = True) -> bool:
868868 and all (isinstance (dict_color .get (ch ), int ) for ch in ("h" , "s" , "l" ))
869869 and isinstance (dict_color .get ("a" , "no alpha" ), (float , type (None )))
870870 ):
871- return (
872- 0 <= dict_color ["h" ] <= 360 and 0 <= dict_color ["s" ] <= 100 and 0 <= dict_color ["l" ] <= 100
873- and (dict_color ["a" ] is None or 0 <= dict_color ["a" ] <= 1 )
874- )
871+ return (
872+ 0 <= dict_color ["h" ] <= 360 and 0 <= dict_color ["s" ] <= 100 and 0 <= dict_color ["l" ] <= 100
873+ and (dict_color ["a" ] is None or 0 <= dict_color ["a" ] <= 1 )
874+ )
875875 elif len (dict_color ) == 3 and all (isinstance (dict_color .get (ch ), int ) for ch in ("h" , "s" , "l" )):
876876 return 0 <= dict_color ["h" ] <= 360 and 0 <= dict_color ["s" ] <= 100 and 0 <= dict_color ["l" ] <= 100
877877 else :
0 commit comments