2727#
2828################################################## TypeAlias ##################################################
2929
30- PathsList : TypeAlias = Union [list [Path ], list [str ], list [Path | str ]]
30+ PathsList : TypeAlias = Union [list [Path ], list [str ], list [Union [ Path , str ] ]]
3131"""Union of all supported list types for a list of paths."""
3232
33- DataStructure : TypeAlias = Union [list , tuple , set , frozenset , dict ]
33+ DataStructure : TypeAlias = Union [list [ Any ] , tuple [ Any , ...], set [ Any ] , frozenset [ Any ] , dict [ Any , Any ] ]
3434"""Union of supported data structures used in the `data` module."""
3535DataStructureTypes = (list , tuple , set , frozenset , dict )
3636"""Tuple of supported data structures used in the `data` module."""
3737
38- IndexIterable : TypeAlias = Union [list , tuple , set , frozenset ]
38+ IndexIterable : TypeAlias = Union [list [ Any ] , tuple [ Any , ...], set [ Any ] , frozenset [ Any ] ]
3939"""Union of all iterable types that support indexing operations."""
4040IndexIterableTypes = (list , tuple , set , frozenset )
4141"""Tuple of all iterable types that support indexing operations."""
4242
4343Rgba : TypeAlias = Union [
4444 tuple [Int_0_255 , Int_0_255 , Int_0_255 ],
45- tuple [Int_0_255 , Int_0_255 , Int_0_255 , Float_0_1 ],
45+ tuple [Int_0_255 , Int_0_255 , Int_0_255 , Optional [ Float_0_1 ] ],
4646 list [Int_0_255 ],
47- list [Union [Int_0_255 , Float_0_1 ]],
48- dict [ str , Union [ int , float ]] ,
47+ list [Union [Int_0_255 , Optional [ Float_0_1 ] ]],
48+ "RgbaDict" ,
4949 "rgba" ,
5050 str ,
5151]
5252"""Matches all supported RGBA color value formats."""
5353Hsla : TypeAlias = Union [
5454 tuple [Int_0_360 , Int_0_100 , Int_0_100 ],
55- tuple [Int_0_360 , Int_0_100 , Int_0_100 , Float_0_1 ],
55+ tuple [Int_0_360 , Int_0_100 , Int_0_100 , Optional [ Float_0_1 ] ],
5656 list [Union [Int_0_360 , Int_0_100 ]],
57- list [Union [Int_0_360 , Int_0_100 , Float_0_1 ]],
58- dict [ str , Union [ int , float ]] ,
57+ list [Union [Int_0_360 , Int_0_100 , Optional [ Float_0_1 ] ]],
58+ "HslaDict" ,
5959 "hsla" ,
6060 str ,
6161]
6262"""Matches all supported HSLA color value formats."""
6363Hexa : TypeAlias = Union [str , int , "hexa" ]
64- """Matches all supported hexadecimal color value formats."""
64+ """Matches all supported HEXA color value formats."""
6565
6666AnyRgba : TypeAlias = Any
67- """Generic type alias for RGBA color values in any supported format (type checking disabled)."""
67+ """Generic type alias for RGBA color values in any format (type checking disabled)."""
6868AnyHsla : TypeAlias = Any
69- """Generic type alias for HSLA color values in any supported format (type checking disabled)."""
69+ """Generic type alias for HSLA color values in any format (type checking disabled)."""
7070AnyHexa : TypeAlias = Any
71- """Generic type alias for hexadecimal color values in any supported format (type checking disabled)."""
71+ """Generic type alias for HEXA color values in any format (type checking disabled)."""
7272
7373ArgParseConfig : TypeAlias = Union [set [str ], "ArgConfigWithDefault" , Literal ["before" , "after" ]]
7474"""Matches the command-line-parsing configuration of a single argument."""
@@ -92,7 +92,6 @@ class ArgConfigWithDefault(TypedDict):
9292 flags : set [str ]
9393 default : str
9494
95-
9695class ArgData (TypedDict ):
9796 """Schema for the resulting data of parsing a single command-line argument."""
9897 exists : bool
@@ -101,6 +100,28 @@ class ArgData(TypedDict):
101100 flag : Optional [str ]
102101
103102
103+ class RgbaDict (TypedDict ):
104+ """Dictionary schema for RGBA color components."""
105+ r : Int_0_255
106+ g : Int_0_255
107+ b : Int_0_255
108+ a : Optional [Float_0_1 ]
109+
110+ class HslaDict (TypedDict ):
111+ """Dictionary schema for HSLA color components."""
112+ h : Int_0_360
113+ s : Int_0_100
114+ l : Int_0_100
115+ a : Optional [Float_0_1 ]
116+
117+ class HexaDict (TypedDict ):
118+ """Dictionary schema for HEXA color components."""
119+ r : str
120+ g : str
121+ b : str
122+ a : Optional [str ]
123+
124+
104125class MissingLibsMsgs (TypedDict ):
105126 """Configuration schema for custom messages in `System.check_libs()` when checking library dependencies."""
106127 found_missing : str
0 commit comments