1- from typing import Any
2- from typing import Callable
3- from typing import Literal
4- from typing import Optional
5- from typing import Sequence
6- from typing import Tuple
7- from typing import Type
8- from typing import TypeVar
1+ import typing
92
103from gi .repository import GLib
114from gi .repository import GObject
125
13- T = TypeVar ("T" )
6+ T = typing . TypeVar ("T" )
147
158MAJOR_VERSION : int = 1
169MICRO_VERSION : int = 0
@@ -42,25 +35,25 @@ def callable_info_get_return_type(info: BaseInfo) -> BaseInfo: ...
4235def callable_info_invoke (
4336 info : BaseInfo ,
4437 function : None ,
45- in_args : Sequence [Argument ],
46- out_args : Sequence [Argument ],
38+ in_args : typing . Sequence [Argument ],
39+ out_args : typing . Sequence [Argument ],
4740 return_value : Argument ,
4841 is_method : bool ,
4942 throws : bool ,
5043) -> bool : ...
5144def callable_info_is_method (info : BaseInfo ) -> bool : ...
5245def callable_info_iterate_return_attributes (
5346 info : BaseInfo ,
54- ) -> Tuple [bool , AttributeIter , str , str ]: ...
47+ ) -> typing . Tuple [bool , AttributeIter , str , str ]: ...
5548def callable_info_load_arg (info : BaseInfo , n : int ) -> BaseInfo : ...
5649def callable_info_load_return_type (info : BaseInfo ) -> BaseInfo : ...
5750def callable_info_may_return_null (info : BaseInfo ) -> bool : ...
5851def callable_info_skip_return (info : BaseInfo ) -> bool : ...
5952def cclosure_marshal_generic (
60- closure : Callable [..., Any ],
61- return_gvalue : Any ,
53+ closure : typing . Callable [..., typing . Any ],
54+ return_gvalue : typing . Any ,
6255 n_param_values : int ,
63- param_values : Any ,
56+ param_values : typing . Any ,
6457 invocation_hint : None ,
6558 marshal_data : None ,
6659) -> None : ...
@@ -103,22 +96,22 @@ def interface_info_get_property(info: BaseInfo, n: int) -> BaseInfo: ...
10396def interface_info_get_signal (info : BaseInfo , n : int ) -> BaseInfo : ...
10497def interface_info_get_vfunc (info : BaseInfo , n : int ) -> BaseInfo : ...
10598def invoke_error_quark () -> int : ...
106- def object_info_find_method (info : BaseInfo , name : str ) -> Optional [BaseInfo ]: ...
99+ def object_info_find_method (info : BaseInfo , name : str ) -> typing . Optional [BaseInfo ]: ...
107100def object_info_find_method_using_interfaces (
108101 info : BaseInfo , name : str
109- ) -> Tuple [Optional [BaseInfo ], BaseInfo ]: ...
110- def object_info_find_signal (info : BaseInfo , name : str ) -> Optional [BaseInfo ]: ...
111- def object_info_find_vfunc (info : BaseInfo , name : str ) -> Optional [BaseInfo ]: ...
102+ ) -> typing . Tuple [typing . Optional [BaseInfo ], BaseInfo ]: ...
103+ def object_info_find_signal (info : BaseInfo , name : str ) -> typing . Optional [BaseInfo ]: ...
104+ def object_info_find_vfunc (info : BaseInfo , name : str ) -> typing . Optional [BaseInfo ]: ...
112105def object_info_find_vfunc_using_interfaces (
113106 info : BaseInfo , name : str
114- ) -> Tuple [Optional [BaseInfo ], BaseInfo ]: ...
107+ ) -> typing . Tuple [typing . Optional [BaseInfo ], BaseInfo ]: ...
115108def object_info_get_abstract (info : BaseInfo ) -> bool : ...
116- def object_info_get_class_struct (info : BaseInfo ) -> Optional [BaseInfo ]: ...
109+ def object_info_get_class_struct (info : BaseInfo ) -> typing . Optional [BaseInfo ]: ...
117110def object_info_get_constant (info : BaseInfo , n : int ) -> BaseInfo : ...
118111def object_info_get_field (info : BaseInfo , n : int ) -> BaseInfo : ...
119112def object_info_get_final (info : BaseInfo ) -> bool : ...
120113def object_info_get_fundamental (info : BaseInfo ) -> bool : ...
121- def object_info_get_get_value_function (info : BaseInfo ) -> Optional [str ]: ...
114+ def object_info_get_get_value_function (info : BaseInfo ) -> typing . Optional [str ]: ...
122115def object_info_get_interface (info : BaseInfo , n : int ) -> BaseInfo : ...
123116def object_info_get_method (info : BaseInfo , n : int ) -> BaseInfo : ...
124117def object_info_get_n_constants (info : BaseInfo ) -> int : ...
@@ -128,21 +121,21 @@ def object_info_get_n_methods(info: BaseInfo) -> int: ...
128121def object_info_get_n_properties (info : BaseInfo ) -> int : ...
129122def object_info_get_n_signals (info : BaseInfo ) -> int : ...
130123def object_info_get_n_vfuncs (info : BaseInfo ) -> int : ...
131- def object_info_get_parent (info : BaseInfo ) -> Optional [BaseInfo ]: ...
124+ def object_info_get_parent (info : BaseInfo ) -> typing . Optional [BaseInfo ]: ...
132125def object_info_get_property (info : BaseInfo , n : int ) -> BaseInfo : ...
133- def object_info_get_ref_function (info : BaseInfo ) -> Optional [str ]: ...
134- def object_info_get_set_value_function (info : BaseInfo ) -> Optional [str ]: ...
126+ def object_info_get_ref_function (info : BaseInfo ) -> typing . Optional [str ]: ...
127+ def object_info_get_set_value_function (info : BaseInfo ) -> typing . Optional [str ]: ...
135128def object_info_get_signal (info : BaseInfo , n : int ) -> BaseInfo : ...
136129def object_info_get_type_init (info : BaseInfo ) -> str : ...
137130def object_info_get_type_name (info : BaseInfo ) -> str : ...
138- def object_info_get_unref_function (info : BaseInfo ) -> Optional [str ]: ...
131+ def object_info_get_unref_function (info : BaseInfo ) -> typing . Optional [str ]: ...
139132def object_info_get_vfunc (info : BaseInfo , n : int ) -> BaseInfo : ...
140133def property_info_get_flags (info : BaseInfo ) -> GObject .ParamFlags : ...
141- def property_info_get_getter (info : BaseInfo ) -> Optional [BaseInfo ]: ...
134+ def property_info_get_getter (info : BaseInfo ) -> typing . Optional [BaseInfo ]: ...
142135def property_info_get_ownership_transfer (info : BaseInfo ) -> Transfer : ...
143- def property_info_get_setter (info : BaseInfo ) -> Optional [BaseInfo ]: ...
136+ def property_info_get_setter (info : BaseInfo ) -> typing . Optional [BaseInfo ]: ...
144137def property_info_get_type (info : BaseInfo ) -> BaseInfo : ...
145- def registered_type_info_get_g_type (info : BaseInfo ) -> Type [Any ]: ...
138+ def registered_type_info_get_g_type (info : BaseInfo ) -> typing . Type [typing . Any ]: ...
146139def registered_type_info_get_type_init (info : BaseInfo ) -> str : ...
147140def registered_type_info_get_type_name (info : BaseInfo ) -> str : ...
148141def signal_info_get_class_closure (info : BaseInfo ) -> BaseInfo : ...
@@ -151,9 +144,9 @@ def signal_info_true_stops_emit(info: BaseInfo) -> bool: ...
151144def struct_info_find_field (info : BaseInfo , name : str ) -> BaseInfo : ...
152145def struct_info_find_method (info : BaseInfo , name : str ) -> BaseInfo : ...
153146def struct_info_get_alignment (info : BaseInfo ) -> int : ...
154- def struct_info_get_copy_function (info : BaseInfo ) -> Optional [str ]: ...
147+ def struct_info_get_copy_function (info : BaseInfo ) -> typing . Optional [str ]: ...
155148def struct_info_get_field (info : BaseInfo , n : int ) -> BaseInfo : ...
156- def struct_info_get_free_function (info : BaseInfo ) -> Optional [str ]: ...
149+ def struct_info_get_free_function (info : BaseInfo ) -> typing . Optional [str ]: ...
157150def struct_info_get_method (info : BaseInfo , n : int ) -> BaseInfo : ...
158151def struct_info_get_n_fields (info : BaseInfo ) -> int : ...
159152def struct_info_get_n_methods (info : BaseInfo ) -> int : ...
@@ -182,19 +175,21 @@ def type_tag_hash_pointer_from_argument(
182175def type_tag_to_string (type : TypeTag ) -> str : ...
183176def union_info_find_method (info : BaseInfo , name : str ) -> BaseInfo : ...
184177def union_info_get_alignment (info : BaseInfo ) -> int : ...
185- def union_info_get_copy_function (info : BaseInfo ) -> Optional [str ]: ...
178+ def union_info_get_copy_function (info : BaseInfo ) -> typing . Optional [str ]: ...
186179def union_info_get_discriminator (info : BaseInfo , n : int ) -> BaseInfo : ...
187180def union_info_get_discriminator_offset (info : BaseInfo ) -> int : ...
188181def union_info_get_discriminator_type (info : BaseInfo ) -> BaseInfo : ...
189182def union_info_get_field (info : BaseInfo , n : int ) -> BaseInfo : ...
190- def union_info_get_free_function (info : BaseInfo ) -> Optional [str ]: ...
183+ def union_info_get_free_function (info : BaseInfo ) -> typing . Optional [str ]: ...
191184def union_info_get_method (info : BaseInfo , n : int ) -> BaseInfo : ...
192185def union_info_get_n_fields (info : BaseInfo ) -> int : ...
193186def union_info_get_n_methods (info : BaseInfo ) -> int : ...
194187def union_info_get_size (info : BaseInfo ) -> int : ...
195188def union_info_is_discriminated (info : BaseInfo ) -> bool : ...
196189def value_info_get_value (info : BaseInfo ) -> int : ...
197- def vfunc_info_get_address (info : BaseInfo , implementor_gtype : Type [Any ]) -> None : ...
190+ def vfunc_info_get_address (
191+ info : BaseInfo , implementor_gtype : typing .Type [typing .Any ]
192+ ) -> None : ...
198193def vfunc_info_get_flags (info : BaseInfo ) -> VFuncInfoFlags : ...
199194def vfunc_info_get_invoker (info : BaseInfo ) -> BaseInfo : ...
200195def vfunc_info_get_offset (info : BaseInfo ) -> int : ...
@@ -262,7 +257,7 @@ class BaseInfo(GObject.GBoxed):
262257 def get_type (self ) -> InfoType : ...
263258 def get_typelib (self ) -> Typelib : ...
264259 def is_deprecated (self ) -> bool : ...
265- def iterate_attributes (self ) -> Tuple [bool , AttributeIter , str , str ]: ...
260+ def iterate_attributes (self ) -> typing . Tuple [bool , AttributeIter , str , str ]: ...
266261
267262class Repository (GObject .Object ):
268263 """
@@ -286,7 +281,7 @@ class Repository(GObject.Object):
286281 @staticmethod
287282 def error_quark () -> int : ...
288283 def find_by_error_domain (self , domain : int ) -> BaseInfo : ...
289- def find_by_gtype (self , gtype : Type [Any ]) -> BaseInfo : ...
284+ def find_by_gtype (self , gtype : typing . Type [typing . Any ]) -> BaseInfo : ...
290285 def find_by_name (self , namespace_ : str , name : str ) -> BaseInfo : ...
291286 def get_c_prefix (self , namespace_ : str ) -> str : ...
292287 @staticmethod
@@ -296,28 +291,32 @@ class Repository(GObject.Object):
296291 def get_info (self , namespace_ : str , index : int ) -> BaseInfo : ...
297292 def get_loaded_namespaces (self ) -> list [str ]: ...
298293 def get_n_infos (self , namespace_ : str ) -> int : ...
299- def get_object_gtype_interfaces (self , gtype : Type [Any ]) -> list [BaseInfo ]: ...
294+ def get_object_gtype_interfaces (
295+ self , gtype : typing .Type [typing .Any ]
296+ ) -> list [BaseInfo ]: ...
300297 @staticmethod
301298 def get_option_group () -> GLib .OptionGroup : ...
302299 @staticmethod
303300 def get_search_path () -> list [str ]: ...
304- def get_shared_library (self , namespace_ : str ) -> Optional [str ]: ...
301+ def get_shared_library (self , namespace_ : str ) -> typing . Optional [str ]: ...
305302 def get_typelib_path (self , namespace_ : str ) -> str : ...
306303 def get_version (self , namespace_ : str ) -> str : ...
307- def is_registered (self , namespace_ : str , version : Optional [str ] = None ) -> bool : ...
304+ def is_registered (
305+ self , namespace_ : str , version : typing .Optional [str ] = None
306+ ) -> bool : ...
308307 def load_typelib (self , typelib : Typelib , flags : RepositoryLoadFlags ) -> str : ...
309308 @staticmethod
310309 def prepend_library_path (directory : str ) -> None : ...
311310 @staticmethod
312311 def prepend_search_path (directory : str ) -> None : ...
313312 def require (
314- self , namespace_ : str , version : Optional [str ], flags : RepositoryLoadFlags
313+ self , namespace_ : str , version : typing . Optional [str ], flags : RepositoryLoadFlags
315314 ) -> Typelib : ...
316315 def require_private (
317316 self ,
318317 typelib_dir : str ,
319318 namespace_ : str ,
320- version : Optional [str ],
319+ version : typing . Optional [str ],
321320 flags : RepositoryLoadFlags ,
322321 ) -> Typelib : ...
323322
0 commit comments