diff --git a/src/gi-stubs/repository/GLib.pyi b/src/gi-stubs/repository/GLib.pyi index 53fe4d89..e12b05a2 100644 --- a/src/gi-stubs/repository/GLib.pyi +++ b/src/gi-stubs/repository/GLib.pyi @@ -1,12 +1,4 @@ -from typing import Any -from typing import Callable -from typing import Literal -from typing import Optional -from typing import Sequence -from typing import Tuple -from typing import Type -from typing import TypeVar -from typing import Union +import typing from gi.repository import GObject @@ -229,14 +221,14 @@ def ascii_strcasecmp(s1: str, s2: str) -> int: ... def ascii_strdown(str: str, len: int) -> str: ... def ascii_string_to_signed( str: str, base: int, min: int, max: int -) -> Tuple[bool, int]: ... +) -> typing.Tuple[bool, int]: ... def ascii_string_to_unsigned( str: str, base: int, min: int, max: int -) -> Tuple[bool, int]: ... +) -> typing.Tuple[bool, int]: ... def ascii_strncasecmp(s1: str, s2: str, n: int) -> int: ... -def ascii_strtod(nptr: str) -> Tuple[float, str]: ... -def ascii_strtoll(nptr: str, base: int) -> Tuple[int, str]: ... -def ascii_strtoull(nptr: str, base: int) -> Tuple[int, str]: ... +def ascii_strtod(nptr: str) -> typing.Tuple[float, str]: ... +def ascii_strtoll(nptr: str, base: int) -> typing.Tuple[int, str]: ... +def ascii_strtoull(nptr: str, base: int) -> typing.Tuple[int, str]: ... def ascii_strup(str: str, len: int) -> str: ... def ascii_tolower(c: int) -> int: ... def ascii_toupper(c: int) -> int: ... @@ -288,13 +280,13 @@ def assertion_message_error( error_domain: int, error_code: int, ) -> None: ... -def atexit(func: Callable[[], None]) -> None: ... +def atexit(func: typing.Callable[[], None]) -> None: ... def atomic_int_add(atomic: int, val: int) -> int: ... def atomic_int_and(atomic: int, val: int) -> int: ... def atomic_int_compare_and_exchange(atomic: int, oldval: int, newval: int) -> bool: ... def atomic_int_compare_and_exchange_full( atomic: int, oldval: int, newval: int -) -> Tuple[bool, int]: ... +) -> typing.Tuple[bool, int]: ... def atomic_int_dec_and_test(atomic: int) -> bool: ... def atomic_int_exchange(atomic: int, newval: int) -> int: ... def atomic_int_exchange_and_add(atomic: int, val: int) -> int: ... @@ -310,7 +302,7 @@ def atomic_pointer_compare_and_exchange( ) -> bool: ... def atomic_pointer_compare_and_exchange_full( atomic: None, oldval: None, newval: None -) -> Tuple[bool, None]: ... +) -> typing.Tuple[bool, None]: ... def atomic_pointer_exchange(atomic: None, newval: None) -> None: ... def atomic_pointer_get(atomic: None) -> None: ... def atomic_pointer_or(atomic: None, val: int) -> int: ... @@ -323,19 +315,19 @@ def atomic_rc_box_dup(block_size: int, mem_block: None) -> None: ... def atomic_rc_box_get_size(mem_block: None) -> int: ... def atomic_rc_box_release(mem_block: None) -> None: ... def atomic_rc_box_release_full( - mem_block: None, clear_func: Callable[[None], None] + mem_block: None, clear_func: typing.Callable[[None], None] ) -> None: ... def atomic_ref_count_compare(arc: int, val: int) -> bool: ... def atomic_ref_count_dec(arc: int) -> bool: ... def atomic_ref_count_inc(arc: int) -> None: ... def atomic_ref_count_init(arc: int) -> None: ... def base64_decode(text: str) -> bytes: ... -def base64_decode_inplace() -> Tuple[int, bytes]: ... -def base64_encode(data: Optional[Sequence[int]] = None) -> str: ... -def base64_encode_close(break_lines: bool) -> Tuple[int, bytes, int, int]: ... +def base64_decode_inplace() -> typing.Tuple[int, bytes]: ... +def base64_encode(data: typing.Optional[typing.Sequence[int]] = None) -> str: ... +def base64_encode_close(break_lines: bool) -> typing.Tuple[int, bytes, int, int]: ... def base64_encode_step( - in_: Sequence[int], break_lines: bool -) -> Tuple[int, bytes, int, int]: ... + in_: typing.Sequence[int], break_lines: bool +) -> typing.Tuple[int, bytes, int, int]: ... def basename(file_name: str) -> str: ... def bit_lock(address: int, lock_bit: int) -> None: ... def bit_nth_lsf(mask: int, nth_bit: int) -> int: ... @@ -345,35 +337,39 @@ def bit_trylock(address: int, lock_bit: int) -> bool: ... def bit_unlock(address: int, lock_bit: int) -> None: ... def blow_chunks() -> None: ... def bookmark_file_error_quark() -> int: ... -def build_filenamev(args: Sequence[str]) -> str: ... -def build_pathv(separator: str, args: Sequence[str]) -> str: ... -def byte_array_append(array: Sequence[int], data: int, len: int) -> bytes: ... -def byte_array_free(array: Sequence[int], free_segment: bool) -> int: ... -def byte_array_free_to_bytes(array: Sequence[int]) -> Bytes: ... +def build_filenamev(args: typing.Sequence[str]) -> str: ... +def build_pathv(separator: str, args: typing.Sequence[str]) -> str: ... +def byte_array_append(array: typing.Sequence[int], data: int, len: int) -> bytes: ... +def byte_array_free(array: typing.Sequence[int], free_segment: bool) -> int: ... +def byte_array_free_to_bytes(array: typing.Sequence[int]) -> Bytes: ... def byte_array_new() -> bytes: ... -def byte_array_new_take(data: Sequence[int]) -> bytes: ... -def byte_array_prepend(array: Sequence[int], data: int, len: int) -> bytes: ... -def byte_array_ref(array: Sequence[int]) -> bytes: ... -def byte_array_remove_index(array: Sequence[int], index_: int) -> bytes: ... -def byte_array_remove_index_fast(array: Sequence[int], index_: int) -> bytes: ... +def byte_array_new_take(data: typing.Sequence[int]) -> bytes: ... +def byte_array_prepend(array: typing.Sequence[int], data: int, len: int) -> bytes: ... +def byte_array_ref(array: typing.Sequence[int]) -> bytes: ... +def byte_array_remove_index(array: typing.Sequence[int], index_: int) -> bytes: ... +def byte_array_remove_index_fast(array: typing.Sequence[int], index_: int) -> bytes: ... def byte_array_remove_range( - array: Sequence[int], index_: int, length: int + array: typing.Sequence[int], index_: int, length: int ) -> bytes: ... -def byte_array_set_size(array: Sequence[int], length: int) -> bytes: ... +def byte_array_set_size(array: typing.Sequence[int], length: int) -> bytes: ... def byte_array_sized_new(reserved_size: int) -> bytes: ... def byte_array_sort( - array: Sequence[int], compare_func: Callable[[None, None], int] + array: typing.Sequence[int], compare_func: typing.Callable[[None, None], int] ) -> None: ... def byte_array_sort_with_data( - array: Sequence[int], compare_func: Callable[..., int], *user_data: Any + array: typing.Sequence[int], + compare_func: typing.Callable[..., int], + *user_data: typing.Any, ) -> None: ... -def byte_array_steal(array: Sequence[int]) -> Tuple[int, int]: ... -def byte_array_unref(array: Sequence[int]) -> None: ... -def canonicalize_filename(filename: str, relative_to: Optional[str] = None) -> str: ... +def byte_array_steal(array: typing.Sequence[int]) -> typing.Tuple[int, int]: ... +def byte_array_unref(array: typing.Sequence[int]) -> None: ... +def canonicalize_filename( + filename: str, relative_to: typing.Optional[str] = None +) -> str: ... def chdir(path: str) -> int: ... def check_version( required_major: int, required_minor: int, required_micro: int -) -> Optional[str]: ... +) -> typing.Optional[str]: ... def checksum_type_get_length(checksum_type: ChecksumType) -> int: ... def child_watch_add(*args, **kwargs): ... # FIXME Function def child_watch_source_new(pid: int) -> Source: ... @@ -383,42 +379,42 @@ def close(fd: int) -> bool: ... def closefrom(lowfd: int) -> int: ... def compute_checksum_for_bytes( checksum_type: ChecksumType, data: Bytes -) -> Optional[str]: ... +) -> typing.Optional[str]: ... def compute_checksum_for_data( - checksum_type: ChecksumType, data: Sequence[int] -) -> Optional[str]: ... + checksum_type: ChecksumType, data: typing.Sequence[int] +) -> typing.Optional[str]: ... def compute_checksum_for_string( checksum_type: ChecksumType, str: str, length: int -) -> Optional[str]: ... +) -> typing.Optional[str]: ... def compute_hmac_for_bytes( digest_type: ChecksumType, key: Bytes, data: Bytes ) -> str: ... def compute_hmac_for_data( - digest_type: ChecksumType, key: Sequence[int], data: Sequence[int] + digest_type: ChecksumType, key: typing.Sequence[int], data: typing.Sequence[int] ) -> str: ... def compute_hmac_for_string( - digest_type: ChecksumType, key: Sequence[int], str: str, length: int + digest_type: ChecksumType, key: typing.Sequence[int], str: str, length: int ) -> str: ... def convert( - str: Sequence[int], to_codeset: str, from_codeset: str -) -> Tuple[bytes, int]: ... + str: typing.Sequence[int], to_codeset: str, from_codeset: str +) -> typing.Tuple[bytes, int]: ... def convert_error_quark() -> int: ... def convert_with_fallback( - str: Sequence[int], to_codeset: str, from_codeset: str, fallback: str -) -> Tuple[bytes, int]: ... + str: typing.Sequence[int], to_codeset: str, from_codeset: str, fallback: str +) -> typing.Tuple[bytes, int]: ... def creat(filename: str, mode: int) -> int: ... def datalist_foreach( - datalist: Data, func: Callable[..., None], *user_data: Any + datalist: Data, func: typing.Callable[..., None], *user_data: typing.Any ) -> None: ... def datalist_get_data(datalist: Data, key: str) -> None: ... def datalist_get_flags(datalist: Data) -> int: ... def datalist_id_get_data(datalist: Data, key_id: int) -> None: ... -def datalist_id_remove_multiple(datalist: Data, keys: Sequence[int]) -> None: ... +def datalist_id_remove_multiple(datalist: Data, keys: typing.Sequence[int]) -> None: ... def datalist_set_flags(datalist: Data, flags: int) -> None: ... def datalist_unset_flags(datalist: Data, flags: int) -> None: ... def dataset_destroy(dataset_location: None) -> None: ... def dataset_foreach( - dataset_location: None, func: Callable[..., None], *user_data: Any + dataset_location: None, func: typing.Callable[..., None], *user_data: typing.Any ) -> None: ... def dataset_id_get_data(dataset_location: None, key_id: int) -> None: ... def date_get_days_in_month(month: DateMonth, year: int) -> int: ... @@ -432,53 +428,67 @@ def date_valid_julian(julian_date: int) -> bool: ... def date_valid_month(month: DateMonth) -> bool: ... def date_valid_weekday(weekday: DateWeekday) -> bool: ... def date_valid_year(year: int) -> bool: ... -def dcgettext(domain: Optional[str], msgid: str, category: int) -> str: ... -def dgettext(domain: Optional[str], msgid: str) -> str: ... -def dir_make_tmp(tmpl: Optional[str] = None) -> str: ... +def dcgettext(domain: typing.Optional[str], msgid: str, category: int) -> str: ... +def dgettext(domain: typing.Optional[str], msgid: str) -> str: ... +def dir_make_tmp(tmpl: typing.Optional[str] = None) -> str: ... def direct_equal(v1: None, v2: None) -> bool: ... def direct_hash(v: None) -> int: ... -def dngettext(domain: Optional[str], msgid: str, msgid_plural: str, n: int) -> str: ... +def dngettext( + domain: typing.Optional[str], msgid: str, msgid_plural: str, n: int +) -> str: ... def double_equal(v1: None, v2: None) -> bool: ... def double_hash(v: None) -> int: ... -def dpgettext(domain: Optional[str], msgctxtid: str, msgidoffset: int) -> str: ... -def dpgettext2(domain: Optional[str], context: str, msgid: str) -> str: ... -def environ_getenv(envp: Optional[Sequence[str]], variable: str) -> Optional[str]: ... +def dpgettext( + domain: typing.Optional[str], msgctxtid: str, msgidoffset: int +) -> str: ... +def dpgettext2(domain: typing.Optional[str], context: str, msgid: str) -> str: ... +def environ_getenv( + envp: typing.Optional[typing.Sequence[str]], variable: str +) -> typing.Optional[str]: ... def environ_setenv( - envp: Optional[Sequence[str]], variable: str, value: str, overwrite: bool + envp: typing.Optional[typing.Sequence[str]], + variable: str, + value: str, + overwrite: bool, +) -> list[str]: ... +def environ_unsetenv( + envp: typing.Optional[typing.Sequence[str]], variable: str ) -> list[str]: ... -def environ_unsetenv(envp: Optional[Sequence[str]], variable: str) -> list[str]: ... def error_domain_register( error_type_name: str, error_type_private_size: int, - error_type_init: Callable[[Error], None], - error_type_copy: Callable[[Error, Error], None], - error_type_clear: Callable[[Error], None], + error_type_init: typing.Callable[[Error], None], + error_type_copy: typing.Callable[[Error, Error], None], + error_type_clear: typing.Callable[[Error], None], ) -> int: ... def error_domain_register_static( error_type_name: str, error_type_private_size: int, - error_type_init: Callable[[Error], None], - error_type_copy: Callable[[Error, Error], None], - error_type_clear: Callable[[Error], None], + error_type_init: typing.Callable[[Error], None], + error_type_copy: typing.Callable[[Error, Error], None], + error_type_clear: typing.Callable[[Error], None], ) -> int: ... def fdwalk_set_cloexec(lowfd: int) -> int: ... def file_error_from_errno(err_no: int) -> FileError: ... def file_error_quark() -> int: ... -def file_get_contents(filename: str) -> Tuple[bool, bytes]: ... -def file_open_tmp(tmpl: Optional[str] = None) -> Tuple[int, str]: ... +def file_get_contents(filename: str) -> typing.Tuple[bool, bytes]: ... +def file_open_tmp(tmpl: typing.Optional[str] = None) -> typing.Tuple[int, str]: ... def file_read_link(filename: str) -> str: ... -def file_set_contents(filename: str, contents: Sequence[int]) -> bool: ... +def file_set_contents(filename: str, contents: typing.Sequence[int]) -> bool: ... def file_set_contents_full( - filename: str, contents: Sequence[int], flags: FileSetContentsFlags, mode: int + filename: str, + contents: typing.Sequence[int], + flags: FileSetContentsFlags, + mode: int, ) -> bool: ... def file_test(filename: str, test: FileTest) -> bool: ... def filename_display_basename(filename: str) -> str: ... def filename_display_name(filename: str) -> str: ... -def filename_from_uri(uri: str) -> Tuple[str, str]: ... +def filename_from_uri(uri: str) -> typing.Tuple[str, str]: ... def filename_from_utf8(utf8string, len=-1): ... # FIXME Function -def filename_to_uri(filename: str, hostname: Optional[str] = None) -> str: ... -def filename_to_utf8(opsysstring: str, len: int) -> Tuple[str, int, int]: ... -def find_program_in_path(program: str) -> Optional[str]: ... +def filename_to_uri(filename: str, hostname: typing.Optional[str] = None) -> str: ... +def filename_to_utf8(opsysstring: str, len: int) -> typing.Tuple[str, int, int]: ... +def find_program_in_path(program: str) -> typing.Optional[str]: ... def fopen(filename: str, mode: str) -> None: ... def format_size(size: int) -> str: ... def format_size_for_display(size: int) -> str: ... @@ -487,14 +497,14 @@ def free(mem: None) -> None: ... def free_sized(mem: None, size: int) -> None: ... def freopen(filename: str, mode: str, stream: None) -> None: ... def fsync(fd: int) -> int: ... -def get_application_name() -> Optional[str]: ... -def get_charset() -> Tuple[bool, str]: ... +def get_application_name() -> typing.Optional[str]: ... +def get_charset() -> typing.Tuple[bool, str]: ... def get_codeset() -> str: ... -def get_console_charset() -> Tuple[bool, str]: ... +def get_console_charset() -> typing.Tuple[bool, str]: ... def get_current_dir() -> str: ... def get_current_time(): ... # FIXME Function def get_environ() -> list[str]: ... -def get_filename_charsets() -> Tuple[bool, list[str]]: ... +def get_filename_charsets() -> typing.Tuple[bool, list[str]]: ... def get_home_dir() -> str: ... def get_host_name() -> str: ... def get_language_names() -> list[str]: ... @@ -502,8 +512,8 @@ def get_language_names_with_category(category_name: str) -> list[str]: ... def get_locale_variants(locale: str) -> list[str]: ... def get_monotonic_time() -> int: ... def get_num_processors() -> int: ... -def get_os_info(key_name: str) -> Optional[str]: ... -def get_prgname() -> Optional[str]: ... +def get_os_info(key_name: str) -> typing.Optional[str]: ... +def get_prgname() -> typing.Optional[str]: ... def get_real_name() -> str: ... def get_real_time() -> int: ... def get_system_config_dirs() -> list[str]: ... @@ -514,29 +524,37 @@ def get_user_config_dir() -> str: ... def get_user_data_dir() -> str: ... def get_user_name() -> str: ... def get_user_runtime_dir() -> str: ... -def get_user_special_dir(directory: UserDirectory) -> Optional[str]: ... +def get_user_special_dir(directory: UserDirectory) -> typing.Optional[str]: ... def get_user_state_dir() -> str: ... -def getenv(variable: str) -> Optional[str]: ... +def getenv(variable: str) -> typing.Optional[str]: ... def hash_table_add(hash_table: dict[None, None], key: None) -> bool: ... def hash_table_contains(hash_table: dict[None, None], key: None) -> bool: ... def hash_table_destroy(hash_table: dict[None, None]) -> None: ... def hash_table_find( - hash_table: dict[None, None], predicate: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + predicate: typing.Callable[..., bool], + *user_data: typing.Any, ) -> None: ... def hash_table_foreach( - hash_table: dict[None, None], func: Callable[..., None], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., None], + *user_data: typing.Any, ) -> None: ... def hash_table_foreach_remove( - hash_table: dict[None, None], func: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... def hash_table_foreach_steal( - hash_table: dict[None, None], func: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... def hash_table_insert(hash_table: dict[None, None], key: None, value: None) -> bool: ... def hash_table_lookup(hash_table: dict[None, None], key: None) -> None: ... def hash_table_lookup_extended( hash_table: dict[None, None], lookup_key: None -) -> Tuple[bool, None, None]: ... +) -> typing.Tuple[bool, None, None]: ... def hash_table_new_similar(other_hash_table: dict[None, None]) -> dict[None, None]: ... def hash_table_ref(hash_table: dict[None, None]) -> dict[None, None]: ... def hash_table_remove(hash_table: dict[None, None], key: None) -> bool: ... @@ -549,35 +567,35 @@ def hash_table_steal(hash_table: dict[None, None], key: None) -> bool: ... def hash_table_steal_all(hash_table: dict[None, None]) -> None: ... def hash_table_steal_extended( hash_table: dict[None, None], lookup_key: None -) -> Tuple[bool, None, None]: ... +) -> typing.Tuple[bool, None, None]: ... def hash_table_unref(hash_table: dict[None, None]) -> None: ... def hook_destroy(hook_list: HookList, hook_id: int) -> bool: ... def hook_destroy_link(hook_list: HookList, hook: Hook) -> None: ... def hook_free(hook_list: HookList, hook: Hook) -> None: ... def hook_insert_before( - hook_list: HookList, sibling: Optional[Hook], hook: Hook + hook_list: HookList, sibling: typing.Optional[Hook], hook: Hook ) -> None: ... def hook_insert_sorted( - hook_list: HookList, hook: Hook, func: Callable[[Hook, Hook], int] + hook_list: HookList, hook: Hook, func: typing.Callable[[Hook, Hook], int] ) -> None: ... def hook_prepend(hook_list: HookList, hook: Hook) -> None: ... def hook_unref(hook_list: HookList, hook: Hook) -> None: ... def hostname_is_ascii_encoded(hostname: str) -> bool: ... def hostname_is_ip_address(hostname: str) -> bool: ... def hostname_is_non_ascii(hostname: str) -> bool: ... -def hostname_to_ascii(hostname: str) -> Optional[str]: ... -def hostname_to_unicode(hostname: str) -> Optional[str]: ... +def hostname_to_ascii(hostname: str) -> typing.Optional[str]: ... +def hostname_to_unicode(hostname: str) -> typing.Optional[str]: ... # override -def idle_add(func: Callable[..., Any], *args: Any) -> int: ... +def idle_add(func: typing.Callable[..., typing.Any], *args: typing.Any) -> int: ... def idle_remove_by_data(data: None) -> bool: ... def idle_source_new() -> Source: ... def int64_equal(v1: None, v2: None) -> bool: ... def int64_hash(v: None) -> int: ... def int_equal(v1: None, v2: None) -> bool: ... def int_hash(v: None) -> int: ... -def intern_static_string(string: Optional[str] = None) -> str: ... -def intern_string(string: Optional[str] = None) -> str: ... +def intern_static_string(string: typing.Optional[str] = None) -> str: ... +def intern_string(string: typing.Optional[str] = None) -> str: ... def io_add_watch(*args, **kwargs): ... # FIXME Function def io_channel_error_from_errno(en: int) -> IOChannelError: ... def io_channel_error_quark() -> int: ... @@ -586,12 +604,14 @@ def key_file_error_quark() -> int: ... def list_pop_allocator() -> None: ... def list_push_allocator(allocator: Allocator) -> None: ... def listenv() -> list[str]: ... -def locale_from_utf8(utf8string: str, len: int) -> Tuple[bytes, int]: ... -def locale_to_utf8(opsysstring: Sequence[int]) -> Tuple[str, int, int]: ... +def locale_from_utf8(utf8string: str, len: int) -> typing.Tuple[bytes, int]: ... +def locale_to_utf8( + opsysstring: typing.Sequence[int], +) -> typing.Tuple[str, int, int]: ... def log_default_handler( - log_domain: Optional[str], + log_domain: typing.Optional[str], log_level: LogLevelFlags, - message: Optional[str], + message: typing.Optional[str], unused_data: None, ) -> None: ... def log_get_debug_enabled() -> bool: ... @@ -600,47 +620,50 @@ def log_set_always_fatal(fatal_mask: LogLevelFlags) -> LogLevelFlags: ... def log_set_debug_enabled(enabled: bool) -> None: ... def log_set_fatal_mask(log_domain: str, fatal_mask: LogLevelFlags) -> LogLevelFlags: ... def log_set_handler( - log_domain: Optional[str], + log_domain: typing.Optional[str], log_levels: LogLevelFlags, - log_func: Callable[..., None], - *user_data: Any, + log_func: typing.Callable[..., None], + *user_data: typing.Any, ) -> int: ... def log_set_writer_func( - func: Optional[Callable[..., LogWriterOutput]] = None, *user_data: Any + func: typing.Optional[typing.Callable[..., LogWriterOutput]] = None, + *user_data: typing.Any, ) -> None: ... def log_structured_array( - log_level: LogLevelFlags, fields: Sequence[LogField] + log_level: LogLevelFlags, fields: typing.Sequence[LogField] ) -> None: ... def log_variant( - log_domain: Optional[str], log_level: LogLevelFlags, fields: Variant + log_domain: typing.Optional[str], log_level: LogLevelFlags, fields: Variant ) -> None: ... def log_writer_default( - log_level: LogLevelFlags, fields: Sequence[LogField], user_data: None + log_level: LogLevelFlags, fields: typing.Sequence[LogField], user_data: None ) -> LogWriterOutput: ... -def log_writer_default_set_debug_domains(domains: Optional[str] = None) -> None: ... +def log_writer_default_set_debug_domains( + domains: typing.Optional[str] = None, +) -> None: ... def log_writer_default_set_use_stderr(use_stderr: bool) -> None: ... def log_writer_default_would_drop( - log_level: LogLevelFlags, log_domain: Optional[str] = None + log_level: LogLevelFlags, log_domain: typing.Optional[str] = None ) -> bool: ... def log_writer_format_fields( - log_level: LogLevelFlags, fields: Sequence[LogField], use_color: bool + log_level: LogLevelFlags, fields: typing.Sequence[LogField], use_color: bool ) -> str: ... def log_writer_is_journald(output_fd: int) -> bool: ... def log_writer_journald( - log_level: LogLevelFlags, fields: Sequence[LogField], user_data: None + log_level: LogLevelFlags, fields: typing.Sequence[LogField], user_data: None ) -> LogWriterOutput: ... def log_writer_standard_streams( - log_level: LogLevelFlags, fields: Sequence[LogField], user_data: None + log_level: LogLevelFlags, fields: typing.Sequence[LogField], user_data: None ) -> LogWriterOutput: ... def log_writer_supports_color(output_fd: int) -> bool: ... def log_writer_syslog( - log_level: LogLevelFlags, fields: Sequence[LogField], user_data: None + log_level: LogLevelFlags, fields: typing.Sequence[LogField], user_data: None ) -> LogWriterOutput: ... def lstat(filename: str, buf: StatBuf) -> int: ... def main_context_default() -> MainContext: ... -def main_context_get_thread_default() -> Optional[MainContext]: ... +def main_context_get_thread_default() -> typing.Optional[MainContext]: ... def main_context_ref_thread_default() -> MainContext: ... -def main_current_source() -> Optional[Source]: ... +def main_current_source() -> typing.Optional[Source]: ... def main_depth() -> int: ... def malloc(n_bytes: int) -> None: ... def malloc0(n_bytes: int) -> None: ... @@ -649,7 +672,7 @@ def malloc_n(n_blocks: int, n_block_bytes: int) -> None: ... def markup_error_quark() -> int: ... # override -def markup_escape_text(str: Union[str, bytes], length: int = ...) -> str: ... +def markup_escape_text(str: typing.Union[str, bytes], length: int = ...) -> str: ... def mem_chunk_info() -> None: ... def mem_is_system_malloc() -> bool: ... def mem_profile() -> None: ... @@ -664,19 +687,21 @@ def nullify_pointer(nullify_location: None) -> None: ... def number_parser_error_quark() -> int: ... def on_error_query(prg_name: str) -> None: ... def on_error_stack_trace(prg_name: str) -> None: ... -def once_init_enter() -> Tuple[bool, None]: ... +def once_init_enter() -> typing.Tuple[bool, None]: ... def once_init_enter_impl(location: int) -> bool: ... def once_init_enter_pointer(location: None) -> bool: ... def once_init_leave(result: int) -> None: ... def once_init_leave_pointer(location: None, result: None) -> None: ... def open(filename: str, flags: int, mode: int) -> int: ... def option_error_quark() -> int: ... -def parse_debug_string(string: Optional[str], keys: Sequence[DebugKey]) -> int: ... +def parse_debug_string( + string: typing.Optional[str], keys: typing.Sequence[DebugKey] +) -> int: ... def path_buf_equal(v1: None, v2: None) -> bool: ... def path_get_basename(file_name: str) -> str: ... def path_get_dirname(file_name: str) -> str: ... def path_is_absolute(file_name: str) -> bool: ... -def path_skip_root(file_name: str) -> Optional[str]: ... +def path_skip_root(file_name: str) -> typing.Optional[str]: ... def pattern_match_simple(pattern: str, string: str) -> bool: ... def pointer_bit_lock(address: None, lock_bit: int) -> None: ... def pointer_bit_lock_and_get(address: None, lock_bit: int) -> int: ... @@ -695,13 +720,13 @@ def qsort_with_data( pbase: None, total_elems: int, size: int, - compare_func: Callable[..., int], - *user_data: Any, + compare_func: typing.Callable[..., int], + *user_data: typing.Any, ) -> None: ... -def quark_from_static_string(string: Optional[str] = None) -> int: ... -def quark_from_string(string: Optional[str] = None) -> int: ... +def quark_from_static_string(string: typing.Optional[str] = None) -> int: ... +def quark_from_string(string: typing.Optional[str] = None) -> int: ... def quark_to_string(quark: int) -> str: ... -def quark_try_string(string: Optional[str] = None) -> int: ... +def quark_try_string(string: typing.Optional[str] = None) -> int: ... def random_double() -> float: ... def random_double_range(begin: float, end: float) -> float: ... def random_int() -> int: ... @@ -714,7 +739,7 @@ def rc_box_dup(block_size: int, mem_block: None) -> None: ... def rc_box_get_size(mem_block: None) -> int: ... def rc_box_release(mem_block: None) -> None: ... def rc_box_release_full( - mem_block: None, clear_func: Callable[[None], None] + mem_block: None, clear_func: typing.Callable[[None], None] ) -> None: ... def realloc(mem: None, n_bytes: int) -> None: ... def realloc_n(mem: None, n_blocks: int, n_block_bytes: int) -> None: ... @@ -728,7 +753,7 @@ def ref_string_new(str: str) -> str: ... def ref_string_new_intern(str: str) -> str: ... def ref_string_new_len(str: str, len: int) -> str: ... def ref_string_release(str: str) -> None: ... -def regex_check_replacement(replacement: str) -> Tuple[bool, bool]: ... +def regex_check_replacement(replacement: str) -> typing.Tuple[bool, bool]: ... def regex_error_quark() -> int: ... def regex_escape_nul(string: str, length: int) -> str: ... def regex_escape_string(string: str, length: int) -> str: ... @@ -749,7 +774,10 @@ def remove(filename: str) -> int: ... def rename(oldfilename: str, newfilename: str) -> int: ... def rmdir(filename: str) -> int: ... def sequence_foreach_range( - begin: SequenceIter, end: SequenceIter, func: Callable[..., None], *user_data: Any + begin: SequenceIter, + end: SequenceIter, + func: typing.Callable[..., None], + *user_data: typing.Any, ) -> None: ... def sequence_get(iter: SequenceIter) -> None: ... def sequence_insert_before(iter: SequenceIter, data: None) -> SequenceIter: ... @@ -764,10 +792,10 @@ def sequence_remove(iter: SequenceIter) -> None: ... def sequence_remove_range(begin: SequenceIter, end: SequenceIter) -> None: ... def sequence_set(iter: SequenceIter, data: None) -> None: ... def sequence_sort_changed( - iter: SequenceIter, cmp_func: Callable[..., int], *cmp_data: Any + iter: SequenceIter, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any ) -> None: ... def sequence_sort_changed_iter( - iter: SequenceIter, iter_cmp: Callable[..., int], *cmp_data: Any + iter: SequenceIter, iter_cmp: typing.Callable[..., int], *cmp_data: typing.Any ) -> None: ... def sequence_swap(a: SequenceIter, b: SequenceIter) -> None: ... def set_application_name(application_name: str) -> None: ... @@ -775,7 +803,7 @@ def set_error_literal(domain: int, code: int, message: str) -> Error: ... def set_prgname(prgname: str) -> None: ... def setenv(variable: str, value: str, overwrite: bool) -> bool: ... def shell_error_quark() -> int: ... -def shell_parse_argv(command_line: str) -> Tuple[bool, list[str]]: ... +def shell_parse_argv(command_line: str) -> typing.Tuple[bool, list[str]]: ... def shell_quote(unquoted_string: str) -> str: ... def shell_unquote(quoted_string: str) -> str: ... def slice_alloc(block_size: int) -> None: ... @@ -797,52 +825,54 @@ def source_set_name_by_id(tag: int, name: str) -> None: ... def spaced_primes_closest(num: int) -> int: ... def spawn_async(*args, **kwargs): ... # FIXME Function def spawn_async_with_fds( - working_directory: Optional[str], - argv: Sequence[str], - envp: Optional[Sequence[str]], + working_directory: typing.Optional[str], + argv: typing.Sequence[str], + envp: typing.Optional[typing.Sequence[str]], flags: SpawnFlags, - child_setup: Optional[Callable[..., None]], + child_setup: typing.Optional[typing.Callable[..., None]], stdin_fd: int, stdout_fd: int, stderr_fd: int, - *user_data: Any, -) -> Tuple[bool, int]: ... + *user_data: typing.Any, +) -> typing.Tuple[bool, int]: ... def spawn_async_with_pipes( - working_directory: Optional[str], - argv: Sequence[str], - envp: Optional[Sequence[str]], + working_directory: typing.Optional[str], + argv: typing.Sequence[str], + envp: typing.Optional[typing.Sequence[str]], flags: SpawnFlags, - child_setup: Optional[Callable[..., None]] = None, - *user_data: Any, -) -> Tuple[bool, int, int, int, int]: ... + child_setup: typing.Optional[typing.Callable[..., None]] = None, + *user_data: typing.Any, +) -> typing.Tuple[bool, int, int, int, int]: ... def spawn_async_with_pipes_and_fds( - working_directory: Optional[str], - argv: Sequence[str], - envp: Optional[Sequence[str]], + working_directory: typing.Optional[str], + argv: typing.Sequence[str], + envp: typing.Optional[typing.Sequence[str]], flags: SpawnFlags, - child_setup: Optional[Callable[..., None]], + child_setup: typing.Optional[typing.Callable[..., None]], stdin_fd: int, stdout_fd: int, stderr_fd: int, - source_fds: Optional[Sequence[int]] = None, - target_fds: Optional[Sequence[int]] = None, - *user_data: Any, -) -> Tuple[bool, int, int, int, int]: ... + source_fds: typing.Optional[typing.Sequence[int]] = None, + target_fds: typing.Optional[typing.Sequence[int]] = None, + *user_data: typing.Any, +) -> typing.Tuple[bool, int, int, int, int]: ... def spawn_check_exit_status(wait_status: int) -> bool: ... def spawn_check_wait_status(wait_status: int) -> bool: ... def spawn_close_pid(pid: int) -> None: ... def spawn_command_line_async(command_line: str) -> bool: ... -def spawn_command_line_sync(command_line: str) -> Tuple[bool, bytes, bytes, int]: ... +def spawn_command_line_sync( + command_line: str, +) -> typing.Tuple[bool, bytes, bytes, int]: ... def spawn_error_quark() -> int: ... def spawn_exit_error_quark() -> int: ... def spawn_sync( - working_directory: Optional[str], - argv: Sequence[str], - envp: Optional[Sequence[str]], + working_directory: typing.Optional[str], + argv: typing.Sequence[str], + envp: typing.Optional[typing.Sequence[str]], flags: SpawnFlags, - child_setup: Optional[Callable[..., None]] = None, - *user_data: Any, -) -> Tuple[bool, bytes, bytes, int]: ... + child_setup: typing.Optional[typing.Callable[..., None]] = None, + *user_data: typing.Any, +) -> typing.Tuple[bool, bytes, bytes, int]: ... def stat(filename: str, buf: StatBuf) -> int: ... def stpcpy(dest: str, src: str) -> str: ... def str_equal(v1: None, v2: None) -> bool: ... @@ -853,29 +883,37 @@ def str_is_ascii(str: str) -> bool: ... def str_match_string( search_term: str, potential_hit: str, accept_alternates: bool ) -> bool: ... -def str_to_ascii(str: str, from_locale: Optional[str] = None) -> str: ... +def str_to_ascii(str: str, from_locale: typing.Optional[str] = None) -> str: ... def str_tokenize_and_fold( - string: str, translit_locale: Optional[str] = None -) -> Tuple[list[str], list[str]]: ... + string: str, translit_locale: typing.Optional[str] = None +) -> typing.Tuple[list[str], list[str]]: ... def strcanon(string: str, valid_chars: str, substitutor: int) -> str: ... def strcasecmp(s1: str, s2: str) -> int: ... def strchomp(string: str) -> str: ... def strchug(string: str) -> str: ... -def strcmp0(str1: Optional[str] = None, str2: Optional[str] = None) -> int: ... +def strcmp0( + str1: typing.Optional[str] = None, str2: typing.Optional[str] = None +) -> int: ... def strcompress(source: str) -> str: ... -def strdelimit(string: str, delimiters: Optional[str], new_delimiter: int) -> str: ... +def strdelimit( + string: str, delimiters: typing.Optional[str], new_delimiter: int +) -> str: ... def strdown(string: str) -> str: ... -def strdup(str: Optional[str] = None) -> str: ... -def strdupv(str_array: Optional[Sequence[str]] = None) -> Optional[list[str]]: ... +def strdup(str: typing.Optional[str] = None) -> str: ... +def strdupv( + str_array: typing.Optional[typing.Sequence[str]] = None, +) -> typing.Optional[list[str]]: ... def strerror(errnum: int) -> str: ... -def strescape(source: str, exceptions: Optional[str] = None) -> str: ... -def strfreev(str_array: Optional[Sequence[str]] = None) -> None: ... +def strescape(source: str, exceptions: typing.Optional[str] = None) -> str: ... +def strfreev(str_array: typing.Optional[typing.Sequence[str]] = None) -> None: ... def strip_context(msgid: str, msgval: str) -> str: ... -def strjoinv(separator: Optional[str], str_array: Sequence[str]) -> str: ... +def strjoinv( + separator: typing.Optional[str], str_array: typing.Sequence[str] +) -> str: ... def strlcat(dest: str, src: str, dest_size: int) -> int: ... def strlcpy(dest: str, src: str, dest_size: int) -> int: ... def strncasecmp(s1: str, s2: str, n: int) -> int: ... -def strndup(str: Optional[str], n: int) -> Optional[str]: ... +def strndup(str: typing.Optional[str], n: int) -> typing.Optional[str]: ... def strnfill(length: int, fill_char: int) -> str: ... def strreverse(string: str) -> str: ... def strrstr(haystack: str, needle: str) -> str: ... @@ -884,22 +922,22 @@ def strsignal(signum: int) -> str: ... def strsplit(string: str, delimiter: str, max_tokens: int) -> list[str]: ... def strsplit_set(string: str, delimiters: str, max_tokens: int) -> list[str]: ... def strstr_len(haystack: str, haystack_len: int, needle: str) -> str: ... -def strtod(nptr: str) -> Tuple[float, str]: ... +def strtod(nptr: str) -> typing.Tuple[float, str]: ... def strup(string: str) -> str: ... -def strv_contains(strv: Sequence[str], str: str) -> bool: ... -def strv_equal(strv1: Sequence[str], strv2: Sequence[str]) -> bool: ... -def strv_get_type() -> Type: ... -def strv_length(str_array: Sequence[str]) -> int: ... +def strv_contains(strv: typing.Sequence[str], str: str) -> bool: ... +def strv_equal(strv1: typing.Sequence[str], strv2: typing.Sequence[str]) -> bool: ... +def strv_get_type() -> typing.Type: ... +def strv_length(str_array: typing.Sequence[str]) -> int: ... def test_add_data_func( - testpath: str, test_data: None, test_func: Callable[..., None] + testpath: str, test_data: None, test_func: typing.Callable[..., None] ) -> None: ... def test_add_data_func_full( testpath: str, test_data: None, - test_func: Callable[..., None], - data_free_func: Callable[[None], None], + test_func: typing.Callable[..., None], + data_free_func: typing.Callable[[None], None], ) -> None: ... -def test_add_func(testpath: str, test_func: Callable[[], None]) -> None: ... +def test_add_func(testpath: str, test_func: typing.Callable[[], None]) -> None: ... def test_assert_expected_messages_internal( domain: str, file: str, line: int, func: str ) -> None: ... @@ -907,16 +945,16 @@ def test_bug(bug_uri_snippet: str) -> None: ... def test_bug_base(uri_pattern: str) -> None: ... def test_disable_crash_reporting() -> None: ... def test_expect_message( - log_domain: Optional[str], log_level: LogLevelFlags, pattern: str + log_domain: typing.Optional[str], log_level: LogLevelFlags, pattern: str ) -> None: ... def test_fail() -> None: ... def test_failed() -> bool: ... def test_get_dir(file_type: TestFileType) -> str: ... def test_get_path() -> str: ... -def test_incomplete(msg: Optional[str] = None) -> None: ... +def test_incomplete(msg: typing.Optional[str] = None) -> None: ... def test_log_type_name(log_type: TestLogType) -> str: ... def test_queue_destroy( - destroy_func: Callable[[None], None], destroy_data: None + destroy_func: typing.Callable[[None], None], destroy_data: None ) -> None: ... def test_queue_free(gfree_pointer: None) -> None: ... def test_rand_double() -> float: ... @@ -926,7 +964,7 @@ def test_rand_int_range(begin: int, end: int) -> int: ... def test_run() -> int: ... def test_run_suite(suite: TestSuite) -> int: ... def test_set_nonfatal_assertions() -> None: ... -def test_skip(msg: Optional[str] = None) -> None: ... +def test_skip(msg: typing.Optional[str] = None) -> None: ... def test_subprocess() -> bool: ... def test_summary(summary: str) -> None: ... def test_timer_elapsed() -> float: ... @@ -939,11 +977,11 @@ def test_trap_fork(usec_timeout: int, test_trap_flags: TestTrapFlags) -> bool: . def test_trap_has_passed() -> bool: ... def test_trap_reached_timeout() -> bool: ... def test_trap_subprocess( - test_path: Optional[str], usec_timeout: int, test_flags: TestSubprocessFlags + test_path: typing.Optional[str], usec_timeout: int, test_flags: TestSubprocessFlags ) -> None: ... def test_trap_subprocess_with_envp( - test_path: Optional[str], - envp: Optional[Sequence[str]], + test_path: typing.Optional[str], + envp: typing.Optional[typing.Sequence[str]], usec_timeout: int, test_flags: TestSubprocessFlags, ) -> None: ... @@ -958,14 +996,16 @@ def thread_pool_stop_unused_threads() -> None: ... def thread_self() -> Thread: ... def thread_yield() -> None: ... def threads_init(): ... # FIXME Function -def time_val_from_iso8601(iso_date: str) -> Tuple[bool, TimeVal]: ... +def time_val_from_iso8601(iso_date: str) -> typing.Tuple[bool, TimeVal]: ... # override -def timeout_add(interval: int, function: Callable[..., Any], *args: Any) -> int: ... +def timeout_add( + interval: int, function: typing.Callable[..., typing.Any], *args: typing.Any +) -> int: ... # override def timeout_add_seconds( - interval: int, function: Callable[..., Any], *args: Any + interval: int, function: typing.Callable[..., typing.Any], *args: typing.Any ) -> int: ... def timeout_source_new(interval: int) -> Source: ... def timeout_source_new_seconds(interval: int) -> Source: ... @@ -979,17 +1019,17 @@ def try_malloc0_n(n_blocks: int, n_block_bytes: int) -> None: ... def try_malloc_n(n_blocks: int, n_block_bytes: int) -> None: ... def try_realloc(mem: None, n_bytes: int) -> None: ... def try_realloc_n(mem: None, n_blocks: int, n_block_bytes: int) -> None: ... -def ucs4_to_utf16(str: Sequence[str]) -> Tuple[int, int, int]: ... -def ucs4_to_utf8(str: Sequence[str]) -> Tuple[str, int, int]: ... +def ucs4_to_utf16(str: typing.Sequence[str]) -> typing.Tuple[int, int, int]: ... +def ucs4_to_utf8(str: typing.Sequence[str]) -> typing.Tuple[str, int, int]: ... def unichar_break_type(c: str) -> UnicodeBreakType: ... def unichar_combining_class(uc: str) -> int: ... -def unichar_compose(a: str, b: str) -> Tuple[bool, str]: ... -def unichar_decompose(ch: str) -> Tuple[bool, str, str]: ... +def unichar_compose(a: str, b: str) -> typing.Tuple[bool, str]: ... +def unichar_decompose(ch: str) -> typing.Tuple[bool, str, str]: ... def unichar_digit_value(c: str) -> int: ... def unichar_fully_decompose( ch: str, compat: bool, result_len: int -) -> Tuple[int, str]: ... -def unichar_get_mirror_char(ch: str) -> Tuple[bool, str]: ... +) -> typing.Tuple[int, str]: ... +def unichar_get_mirror_char(ch: str) -> typing.Tuple[bool, str]: ... def unichar_get_script(ch: str) -> UnicodeScript: ... def unichar_isalnum(c: str) -> bool: ... def unichar_isalpha(c: str) -> bool: ... @@ -1008,7 +1048,7 @@ def unichar_iswide(c: str) -> bool: ... def unichar_iswide_cjk(c: str) -> bool: ... def unichar_isxdigit(c: str) -> bool: ... def unichar_iszerowidth(c: str) -> bool: ... -def unichar_to_utf8(c: str) -> Tuple[int, str]: ... +def unichar_to_utf8(c: str) -> typing.Tuple[int, str]: ... def unichar_tolower(c: str) -> str: ... def unichar_totitle(c: str) -> str: ... def unichar_toupper(c: str) -> str: ... @@ -1016,7 +1056,7 @@ def unichar_type(c: str) -> UnicodeType: ... def unichar_validate(ch: str) -> bool: ... def unichar_xdigit_value(c: str) -> int: ... def unicode_canonical_decomposition(ch: str, result_len: int) -> str: ... -def unicode_canonical_ordering(string: Sequence[str]) -> None: ... +def unicode_canonical_ordering(string: typing.Sequence[str]) -> None: ... def unicode_script_from_iso15924(iso15924: int) -> UnicodeScript: ... def unicode_script_to_iso15924(script: UnicodeScript) -> int: ... def unix_error_quark() -> int: ... @@ -1024,18 +1064,24 @@ def unix_fd_add_full( priority: int, fd: int, condition: IOCondition, - function: Callable[..., bool], - *user_data: Any, + function: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... def unix_fd_source_new(fd: int, condition: IOCondition) -> Source: ... def unix_get_passwd_entry(user_name: str) -> None: ... -def unix_open_pipe(fds: Sequence[int], flags: int) -> bool: ... +def unix_open_pipe(fds: typing.Sequence[int], flags: int) -> bool: ... def unix_set_fd_nonblocking(fd: int, nonblock: bool) -> bool: ... def unix_signal_add( - priority: int, signum: int, handler: Callable[..., bool], *user_data: Any + priority: int, + signum: int, + handler: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... def unix_signal_add_full( - priority: int, signum: int, handler: Callable[..., bool], *user_data: Any + priority: int, + signum: int, + handler: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... def unix_signal_source_new(signum: int) -> Source: ... def unlink(filename: str) -> int: ... @@ -1043,126 +1089,128 @@ def unsetenv(variable: str) -> None: ... def uri_build( flags: UriFlags, scheme: str, - userinfo: Optional[str], - host: Optional[str], + userinfo: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> Uri: ... def uri_build_with_user( flags: UriFlags, scheme: str, - user: Optional[str], - password: Optional[str], - auth_params: Optional[str], - host: Optional[str], + user: typing.Optional[str], + password: typing.Optional[str], + auth_params: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> Uri: ... def uri_error_quark() -> int: ... def uri_escape_bytes( - unescaped: Sequence[int], reserved_chars_allowed: Optional[str] = None + unescaped: typing.Sequence[int], reserved_chars_allowed: typing.Optional[str] = None ) -> str: ... def uri_escape_string( - unescaped: str, reserved_chars_allowed: Optional[str], allow_utf8: bool + unescaped: str, reserved_chars_allowed: typing.Optional[str], allow_utf8: bool ) -> str: ... def uri_is_valid(uri_string: str, flags: UriFlags) -> bool: ... def uri_join( flags: UriFlags, - scheme: Optional[str], - userinfo: Optional[str], - host: Optional[str], + scheme: typing.Optional[str], + userinfo: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> str: ... def uri_join_with_user( flags: UriFlags, - scheme: Optional[str], - user: Optional[str], - password: Optional[str], - auth_params: Optional[str], - host: Optional[str], + scheme: typing.Optional[str], + user: typing.Optional[str], + password: typing.Optional[str], + auth_params: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> str: ... def uri_list_extract_uris(uri_list: str) -> list[str]: ... def uri_parse(uri_string: str, flags: UriFlags) -> Uri: ... def uri_parse_params( params: str, length: int, separators: str, flags: UriParamsFlags ) -> dict[str, str]: ... -def uri_parse_scheme(uri: str) -> Optional[str]: ... -def uri_peek_scheme(uri: str) -> Optional[str]: ... +def uri_parse_scheme(uri: str) -> typing.Optional[str]: ... +def uri_peek_scheme(uri: str) -> typing.Optional[str]: ... def uri_resolve_relative( - base_uri_string: Optional[str], uri_ref: str, flags: UriFlags + base_uri_string: typing.Optional[str], uri_ref: str, flags: UriFlags ) -> str: ... def uri_split( uri_ref: str, flags: UriFlags -) -> Tuple[bool, str, str, str, int, str, str, str]: ... +) -> typing.Tuple[bool, str, str, str, int, str, str, str]: ... def uri_split_network( uri_string: str, flags: UriFlags -) -> Tuple[bool, str, str, int]: ... +) -> typing.Tuple[bool, str, str, int]: ... def uri_split_with_user( uri_ref: str, flags: UriFlags -) -> Tuple[bool, str, str, str, str, str, int, str, str, str]: ... +) -> typing.Tuple[bool, str, str, str, str, str, int, str, str, str]: ... def uri_unescape_bytes( - escaped_string: str, length: int, illegal_characters: Optional[str] = None + escaped_string: str, length: int, illegal_characters: typing.Optional[str] = None ) -> Bytes: ... def uri_unescape_segment( - escaped_string: Optional[str] = None, - escaped_string_end: Optional[str] = None, - illegal_characters: Optional[str] = None, -) -> Optional[str]: ... + escaped_string: typing.Optional[str] = None, + escaped_string_end: typing.Optional[str] = None, + illegal_characters: typing.Optional[str] = None, +) -> typing.Optional[str]: ... def uri_unescape_string( - escaped_string: str, illegal_characters: Optional[str] = None -) -> Optional[str]: ... + escaped_string: str, illegal_characters: typing.Optional[str] = None +) -> typing.Optional[str]: ... def usleep(microseconds: int) -> None: ... -def utf16_to_ucs4(str: Sequence[int]) -> Tuple[str, int, int]: ... -def utf16_to_utf8(str: Sequence[int]) -> Tuple[str, int, int]: ... +def utf16_to_ucs4(str: typing.Sequence[int]) -> typing.Tuple[str, int, int]: ... +def utf16_to_utf8(str: typing.Sequence[int]) -> typing.Tuple[str, int, int]: ... def utf8_casefold(str: str, len: int) -> str: ... def utf8_collate(str1: str, str2: str) -> int: ... def utf8_collate_key(str: str, len: int) -> str: ... def utf8_collate_key_for_filename(str: str, len: int) -> str: ... -def utf8_find_next_char(p: str, end: Optional[str] = None) -> Optional[str]: ... -def utf8_find_prev_char(str: str, p: str) -> Optional[str]: ... +def utf8_find_next_char( + p: str, end: typing.Optional[str] = None +) -> typing.Optional[str]: ... +def utf8_find_prev_char(str: str, p: str) -> typing.Optional[str]: ... def utf8_get_char(p: str) -> str: ... def utf8_get_char_validated(p: str, max_len: int) -> str: ... def utf8_make_valid(str: str, len: int) -> str: ... -def utf8_normalize(str: str, len: int, mode: NormalizeMode) -> Optional[str]: ... +def utf8_normalize(str: str, len: int, mode: NormalizeMode) -> typing.Optional[str]: ... def utf8_offset_to_pointer(str: str, offset: int) -> str: ... def utf8_pointer_to_offset(str: str, pos: str) -> int: ... def utf8_prev_char(p: str) -> str: ... -def utf8_strchr(p: str, len: int, c: str) -> Optional[str]: ... +def utf8_strchr(p: str, len: int, c: str) -> typing.Optional[str]: ... def utf8_strdown(str: str, len: int) -> str: ... def utf8_strlen(p: str, max: int) -> int: ... def utf8_strncpy(dest: str, src: str, n: int) -> str: ... -def utf8_strrchr(p: str, len: int, c: str) -> Optional[str]: ... +def utf8_strrchr(p: str, len: int, c: str) -> typing.Optional[str]: ... def utf8_strreverse(str: str, len: int) -> str: ... def utf8_strup(str: str, len: int) -> str: ... def utf8_substring(str: str, start_pos: int, end_pos: int) -> str: ... -def utf8_to_ucs4(str: str, len: int) -> Tuple[str, int, int]: ... -def utf8_to_ucs4_fast(str: str, len: int) -> Tuple[str, int]: ... -def utf8_to_utf16(str: str, len: int) -> Tuple[int, int, int]: ... +def utf8_to_ucs4(str: str, len: int) -> typing.Tuple[str, int, int]: ... +def utf8_to_ucs4_fast(str: str, len: int) -> typing.Tuple[str, int]: ... +def utf8_to_utf16(str: str, len: int) -> typing.Tuple[int, int, int]: ... def utf8_truncate_middle(string: str, truncate_length: int) -> str: ... -def utf8_validate(str: Sequence[int]) -> Tuple[bool, str]: ... -def utf8_validate_len(str: Sequence[int]) -> Tuple[bool, str]: ... +def utf8_validate(str: typing.Sequence[int]) -> typing.Tuple[bool, str]: ... +def utf8_validate_len(str: typing.Sequence[int]) -> typing.Tuple[bool, str]: ... def utime(filename: str, utb: None) -> int: ... def uuid_string_is_valid(str: str) -> bool: ... def uuid_string_random() -> str: ... -def variant_get_gtype() -> Type: ... +def variant_get_gtype() -> typing.Type: ... def variant_is_object_path(string: str) -> bool: ... def variant_is_signature(string: str) -> bool: ... def variant_parse( - type: Optional[VariantType], + type: typing.Optional[VariantType], text: str, - limit: Optional[str] = None, - endptr: Optional[str] = None, + limit: typing.Optional[str] = None, + endptr: typing.Optional[str] = None, ) -> Variant: ... def variant_parse_error_print_context(error: Error, source_str: str) -> str: ... def variant_parse_error_quark() -> int: ... @@ -1171,8 +1219,8 @@ def variant_type_checked_(type_string: str) -> VariantType: ... def variant_type_string_get_depth_(type_string: str) -> int: ... def variant_type_string_is_valid(type_string: str) -> bool: ... def variant_type_string_scan( - string: str, limit: Optional[str] = None -) -> Tuple[bool, str]: ... + string: str, limit: typing.Optional[str] = None +) -> typing.Tuple[bool, str]: ... class Allocator(GObject.GPointer): def free(self) -> None: ... @@ -1199,17 +1247,19 @@ class AsyncQueue(GObject.GPointer): def push_front(self, item: None) -> None: ... def push_front_unlocked(self, item: None) -> None: ... def push_sorted( - self, data: None, func: Callable[..., int], *user_data: Any + self, data: None, func: typing.Callable[..., int], *user_data: typing.Any ) -> None: ... def push_sorted_unlocked( - self, data: None, func: Callable[..., int], *user_data: Any + self, data: None, func: typing.Callable[..., int], *user_data: typing.Any ) -> None: ... def push_unlocked(self, data: None) -> None: ... def ref_unlocked(self) -> None: ... def remove(self, item: None) -> bool: ... def remove_unlocked(self, item: None) -> bool: ... - def sort(self, func: Callable[..., int], *user_data: Any) -> None: ... - def sort_unlocked(self, func: Callable[..., int], *user_data: Any) -> None: ... + def sort(self, func: typing.Callable[..., int], *user_data: typing.Any) -> None: ... + def sort_unlocked( + self, func: typing.Callable[..., int], *user_data: typing.Any + ) -> None: ... def timed_pop(self, end_time: TimeVal) -> None: ... def timed_pop_unlocked(self, end_time: TimeVal) -> None: ... def timeout_pop(self, timeout: int) -> None: ... @@ -1230,7 +1280,10 @@ class BookmarkFile(GObject.GBoxed): """ def add_application( - self, uri: str, name: Optional[str] = None, exec: Optional[str] = None + self, + uri: str, + name: typing.Optional[str] = None, + exec: typing.Optional[str] = None, ) -> None: ... def add_group(self, uri: str, group: str) -> None: ... def copy(self) -> BookmarkFile: ... @@ -1239,30 +1292,32 @@ class BookmarkFile(GObject.GBoxed): def free(self) -> None: ... def get_added(self, uri: str) -> int: ... def get_added_date_time(self, uri: str) -> DateTime: ... - def get_app_info(self, uri: str, name: str) -> Tuple[bool, str, int, int]: ... + def get_app_info( + self, uri: str, name: str + ) -> typing.Tuple[bool, str, int, int]: ... def get_application_info( self, uri: str, name: str - ) -> Tuple[bool, str, int, DateTime]: ... + ) -> typing.Tuple[bool, str, int, DateTime]: ... def get_applications(self, uri: str) -> list[str]: ... def get_description(self, uri: str) -> str: ... def get_groups(self, uri: str) -> list[str]: ... - def get_icon(self, uri: str) -> Tuple[bool, str, str]: ... + def get_icon(self, uri: str) -> typing.Tuple[bool, str, str]: ... def get_is_private(self, uri: str) -> bool: ... def get_mime_type(self, uri: str) -> str: ... def get_modified(self, uri: str) -> int: ... def get_modified_date_time(self, uri: str) -> DateTime: ... def get_size(self) -> int: ... - def get_title(self, uri: Optional[str] = None) -> str: ... + def get_title(self, uri: typing.Optional[str] = None) -> str: ... def get_uris(self) -> list[str]: ... def get_visited(self, uri: str) -> int: ... def get_visited_date_time(self, uri: str) -> DateTime: ... def has_application(self, uri: str, name: str) -> bool: ... def has_group(self, uri: str, group: str) -> bool: ... def has_item(self, uri: str) -> bool: ... - def load_from_data(self, data: Sequence[int]) -> bool: ... - def load_from_data_dirs(self, file: str) -> Tuple[bool, str]: ... + def load_from_data(self, data: typing.Sequence[int]) -> bool: ... + def load_from_data_dirs(self, file: str) -> typing.Tuple[bool, str]: ... def load_from_file(self, filename: str) -> bool: ... - def move_item(self, old_uri: str, new_uri: Optional[str] = None) -> bool: ... + def move_item(self, old_uri: str, new_uri: typing.Optional[str] = None) -> bool: ... @classmethod def new(cls) -> BookmarkFile: ... def remove_application(self, uri: str, name: str) -> bool: ... @@ -1279,16 +1334,20 @@ class BookmarkFile(GObject.GBoxed): name: str, exec: str, count: int, - stamp: Optional[DateTime] = None, + stamp: typing.Optional[DateTime] = None, ) -> bool: ... - def set_description(self, uri: Optional[str], description: str) -> None: ... - def set_groups(self, uri: str, groups: Optional[Sequence[str]] = None) -> None: ... - def set_icon(self, uri: str, href: Optional[str], mime_type: str) -> None: ... + def set_description(self, uri: typing.Optional[str], description: str) -> None: ... + def set_groups( + self, uri: str, groups: typing.Optional[typing.Sequence[str]] = None + ) -> None: ... + def set_icon( + self, uri: str, href: typing.Optional[str], mime_type: str + ) -> None: ... def set_is_private(self, uri: str, is_private: bool) -> None: ... def set_mime_type(self, uri: str, mime_type: str) -> None: ... def set_modified(self, uri: str, modified: int) -> None: ... def set_modified_date_time(self, uri: str, modified: DateTime) -> None: ... - def set_title(self, uri: Optional[str], title: str) -> None: ... + def set_title(self, uri: typing.Optional[str], title: str) -> None: ... def set_visited(self, uri: str, visited: int) -> None: ... def set_visited_date_time(self, uri: str, visited: DateTime) -> None: ... def to_data(self) -> bytes: ... @@ -1306,41 +1365,45 @@ class ByteArray(GObject.GBoxed): data: int = ... len: int = ... @staticmethod - def append(array: Sequence[int], data: int, len: int) -> bytes: ... + def append(array: typing.Sequence[int], data: int, len: int) -> bytes: ... @staticmethod - def free(array: Sequence[int], free_segment: bool) -> int: ... + def free(array: typing.Sequence[int], free_segment: bool) -> int: ... @staticmethod - def free_to_bytes(array: Sequence[int]) -> Bytes: ... + def free_to_bytes(array: typing.Sequence[int]) -> Bytes: ... @staticmethod def new() -> bytes: ... @staticmethod - def new_take(data: Sequence[int]) -> bytes: ... + def new_take(data: typing.Sequence[int]) -> bytes: ... @staticmethod - def prepend(array: Sequence[int], data: int, len: int) -> bytes: ... + def prepend(array: typing.Sequence[int], data: int, len: int) -> bytes: ... @staticmethod - def ref(array: Sequence[int]) -> bytes: ... + def ref(array: typing.Sequence[int]) -> bytes: ... @staticmethod - def remove_index(array: Sequence[int], index_: int) -> bytes: ... + def remove_index(array: typing.Sequence[int], index_: int) -> bytes: ... @staticmethod - def remove_index_fast(array: Sequence[int], index_: int) -> bytes: ... + def remove_index_fast(array: typing.Sequence[int], index_: int) -> bytes: ... @staticmethod - def remove_range(array: Sequence[int], index_: int, length: int) -> bytes: ... + def remove_range( + array: typing.Sequence[int], index_: int, length: int + ) -> bytes: ... @staticmethod - def set_size(array: Sequence[int], length: int) -> bytes: ... + def set_size(array: typing.Sequence[int], length: int) -> bytes: ... @staticmethod def sized_new(reserved_size: int) -> bytes: ... @staticmethod def sort( - array: Sequence[int], compare_func: Callable[[None, None], int] + array: typing.Sequence[int], compare_func: typing.Callable[[None, None], int] ) -> None: ... @staticmethod def sort_with_data( - array: Sequence[int], compare_func: Callable[..., int], *user_data: Any + array: typing.Sequence[int], + compare_func: typing.Callable[..., int], + *user_data: typing.Any, ) -> None: ... @staticmethod - def steal(array: Sequence[int]) -> Tuple[int, int]: ... + def steal(array: typing.Sequence[int]) -> typing.Tuple[int, int]: ... @staticmethod - def unref(array: Sequence[int]) -> None: ... + def unref(array: typing.Sequence[int]) -> None: ... class Bytes(GObject.GBoxed): """ @@ -1354,15 +1417,15 @@ class Bytes(GObject.GBoxed): def compare(self, bytes2: Bytes) -> int: ... def equal(self, bytes2: Bytes) -> bool: ... - def get_data(self) -> Optional[bytes]: ... + def get_data(self) -> typing.Optional[bytes]: ... def get_region(self, element_size: int, offset: int, n_elements: int) -> None: ... def get_size(self) -> int: ... def hash(self) -> int: ... @classmethod - def new(cls, data: Optional[Sequence[int]] = None) -> Bytes: ... + def new(cls, data: typing.Optional[typing.Sequence[int]] = None) -> Bytes: ... def new_from_bytes(self, offset: int, length: int) -> Bytes: ... @classmethod - def new_take(cls, data: Optional[Sequence[int]] = None) -> Bytes: ... + def new_take(cls, data: typing.Optional[typing.Sequence[int]] = None) -> Bytes: ... def ref(self) -> Bytes: ... def unref(self) -> None: ... def unref_to_array(self) -> bytes: ... @@ -1371,9 +1434,13 @@ class Bytes(GObject.GBoxed): class Cache(GObject.GPointer): def destroy(self) -> None: ... def insert(self, key: None) -> None: ... - def key_foreach(self, func: Callable[..., None], *user_data: Any) -> None: ... + def key_foreach( + self, func: typing.Callable[..., None], *user_data: typing.Any + ) -> None: ... def remove(self, value: None) -> None: ... - def value_foreach(self, func: Callable[..., None], *user_data: Any) -> None: ... + def value_foreach( + self, func: typing.Callable[..., None], *user_data: typing.Any + ) -> None: ... class Checksum(GObject.GBoxed): """ @@ -1388,11 +1455,11 @@ class Checksum(GObject.GBoxed): def free(self) -> None: ... def get_string(self) -> str: ... @classmethod - def new(cls, checksum_type: ChecksumType) -> Optional[Checksum]: ... + def new(cls, checksum_type: ChecksumType) -> typing.Optional[Checksum]: ... def reset(self) -> None: ... @staticmethod def type_get_length(checksum_type: ChecksumType) -> int: ... - def update(self, data: Sequence[int]) -> None: ... + def update(self, data: typing.Sequence[int]) -> None: ... class Completion(GObject.GPointer): """ @@ -1404,10 +1471,10 @@ class Completion(GObject.GPointer): """ items: list[None] = ... - func: Callable[[None], str] = ... + func: typing.Callable[[None], str] = ... prefix: str = ... cache: list[None] = ... - strncmp_func: Callable[[str, str, int], int] = ... + strncmp_func: typing.Callable[[str, str, int], int] = ... def clear_items(self) -> None: ... def complete_utf8(self, prefix: str, new_prefix: str) -> list[str]: ... def free(self) -> None: ... @@ -1535,8 +1602,8 @@ class DateTime(GObject.GBoxed): new_utc(year:int, month:int, day:int, hour:int, minute:int, seconds:float) -> GLib.DateTime or None """ - def add(self, timespan: int) -> Optional[DateTime]: ... - def add_days(self, days: int) -> Optional[DateTime]: ... + def add(self, timespan: int) -> typing.Optional[DateTime]: ... + def add_days(self, days: int) -> typing.Optional[DateTime]: ... def add_full( self, years: int, @@ -1545,18 +1612,18 @@ class DateTime(GObject.GBoxed): hours: int, minutes: int, seconds: float, - ) -> Optional[DateTime]: ... - def add_hours(self, hours: int) -> Optional[DateTime]: ... - def add_minutes(self, minutes: int) -> Optional[DateTime]: ... - def add_months(self, months: int) -> Optional[DateTime]: ... - def add_seconds(self, seconds: float) -> Optional[DateTime]: ... - def add_weeks(self, weeks: int) -> Optional[DateTime]: ... - def add_years(self, years: int) -> Optional[DateTime]: ... + ) -> typing.Optional[DateTime]: ... + def add_hours(self, hours: int) -> typing.Optional[DateTime]: ... + def add_minutes(self, minutes: int) -> typing.Optional[DateTime]: ... + def add_months(self, months: int) -> typing.Optional[DateTime]: ... + def add_seconds(self, seconds: float) -> typing.Optional[DateTime]: ... + def add_weeks(self, weeks: int) -> typing.Optional[DateTime]: ... + def add_years(self, years: int) -> typing.Optional[DateTime]: ... def compare(self, dt2: DateTime) -> int: ... def difference(self, begin: DateTime) -> int: ... def equal(self, dt2: DateTime) -> bool: ... - def format(self, format: str) -> Optional[str]: ... - def format_iso8601(self) -> Optional[str]: ... + def format(self, format: str) -> typing.Optional[str]: ... + def format_iso8601(self) -> typing.Optional[str]: ... def get_day_of_month(self) -> int: ... def get_day_of_week(self) -> int: ... def get_day_of_year(self) -> int: ... @@ -1572,7 +1639,7 @@ class DateTime(GObject.GBoxed): def get_week_numbering_year(self) -> int: ... def get_week_of_year(self) -> int: ... def get_year(self) -> int: ... - def get_ymd(self) -> Tuple[int, int, int]: ... + def get_ymd(self) -> typing.Tuple[int, int, int]: ... def hash(self) -> int: ... def is_daylight_savings(self) -> bool: ... @classmethod @@ -1585,44 +1652,44 @@ class DateTime(GObject.GBoxed): hour: int, minute: int, seconds: float, - ) -> Optional[DateTime]: ... + ) -> typing.Optional[DateTime]: ... @classmethod def new_from_iso8601( - cls, text: str, default_tz: Optional[TimeZone] = None - ) -> Optional[DateTime]: ... + cls, text: str, default_tz: typing.Optional[TimeZone] = None + ) -> typing.Optional[DateTime]: ... @classmethod - def new_from_timeval_local(cls, tv: TimeVal) -> Optional[DateTime]: ... + def new_from_timeval_local(cls, tv: TimeVal) -> typing.Optional[DateTime]: ... @classmethod - def new_from_timeval_utc(cls, tv: TimeVal) -> Optional[DateTime]: ... + def new_from_timeval_utc(cls, tv: TimeVal) -> typing.Optional[DateTime]: ... @classmethod - def new_from_unix_local(cls, t: int) -> Optional[DateTime]: ... + def new_from_unix_local(cls, t: int) -> typing.Optional[DateTime]: ... @classmethod - def new_from_unix_local_usec(cls, usecs: int) -> Optional[DateTime]: ... + def new_from_unix_local_usec(cls, usecs: int) -> typing.Optional[DateTime]: ... @classmethod - def new_from_unix_utc(cls, t: int) -> Optional[DateTime]: ... + def new_from_unix_utc(cls, t: int) -> typing.Optional[DateTime]: ... @classmethod - def new_from_unix_utc_usec(cls, usecs: int) -> Optional[DateTime]: ... + def new_from_unix_utc_usec(cls, usecs: int) -> typing.Optional[DateTime]: ... @classmethod def new_local( cls, year: int, month: int, day: int, hour: int, minute: int, seconds: float - ) -> Optional[DateTime]: ... + ) -> typing.Optional[DateTime]: ... @classmethod - def new_now(cls, tz: TimeZone) -> Optional[DateTime]: ... + def new_now(cls, tz: TimeZone) -> typing.Optional[DateTime]: ... @classmethod - def new_now_local(cls) -> Optional[DateTime]: ... + def new_now_local(cls) -> typing.Optional[DateTime]: ... @classmethod - def new_now_utc(cls) -> Optional[DateTime]: ... + def new_now_utc(cls) -> typing.Optional[DateTime]: ... @classmethod def new_utc( cls, year: int, month: int, day: int, hour: int, minute: int, seconds: float - ) -> Optional[DateTime]: ... + ) -> typing.Optional[DateTime]: ... def ref(self) -> DateTime: ... - def to_local(self) -> Optional[DateTime]: ... + def to_local(self) -> typing.Optional[DateTime]: ... def to_timeval(self, tv: TimeVal) -> bool: ... - def to_timezone(self, tz: TimeZone) -> Optional[DateTime]: ... + def to_timezone(self, tz: TimeZone) -> typing.Optional[DateTime]: ... def to_unix(self) -> int: ... def to_unix_usec(self) -> int: ... - def to_utc(self) -> Optional[DateTime]: ... + def to_utc(self) -> typing.Optional[DateTime]: ... def unref(self) -> None: ... class DebugKey(GObject.GPointer): @@ -1648,7 +1715,7 @@ class Dir(GObject.GBoxed): def close(self) -> None: ... @staticmethod - def make_tmp(tmpl: Optional[str] = None) -> str: ... + def make_tmp(tmpl: typing.Optional[str] = None) -> str: ... @classmethod def open(cls, path: str, flags: int) -> Dir: ... def read_name(self) -> str: ... @@ -1661,7 +1728,7 @@ class DoubleIEEE754(GObject.GPointer): # override class Error(Exception): - args: Any + args: typing.Any code: GObject.GEnum domain: int message: str @@ -1669,16 +1736,16 @@ class Error(Exception): def __init__( self, message: str = ..., - domain: Union[int, str] = ..., - code: Union[GObject.GEnum, int] = ..., + domain: typing.Union[int, str] = ..., + code: typing.Union[GObject.GEnum, int] = ..., ) -> None: ... def copy(self) -> Error: ... def matches( - self, domain: Union[int, str], code: Union[GObject.GEnum, int] + self, domain: typing.Union[int, str], code: typing.Union[GObject.GEnum, int] ) -> bool: ... @classmethod def new_literal( - cls, domain: int, message: str, code: Union[GObject.GEnum, int] + cls, domain: int, message: str, code: typing.Union[GObject.GEnum, int] ) -> Error: ... class FloatIEEE754(GObject.GPointer): @@ -1686,7 +1753,7 @@ class FloatIEEE754(GObject.GPointer): # override class GError: - args: Any + args: typing.Any code: GObject.GEnum domain: int message: str @@ -1694,16 +1761,16 @@ class GError: def __init__( self, message: str = ..., - domain: Union[int, str] = ..., - code: Union[GObject.GEnum, int] = ..., + domain: typing.Union[int, str] = ..., + code: typing.Union[GObject.GEnum, int] = ..., ) -> None: ... def copy(self) -> GError: ... def matches( - self, domain: Union[int, str], code: Union[GObject.GEnum, int] + self, domain: typing.Union[int, str], code: typing.Union[GObject.GEnum, int] ) -> bool: ... @classmethod def new_literal( - cls, domain: int, message: str, code: Union[GObject.GEnum, int] + cls, domain: int, message: str, code: typing.Union[GObject.GEnum, int] ) -> GError: ... class HashTable(GObject.GBoxed): @@ -1715,19 +1782,27 @@ class HashTable(GObject.GBoxed): def destroy(hash_table: dict[None, None]) -> None: ... @staticmethod def find( - hash_table: dict[None, None], predicate: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + predicate: typing.Callable[..., bool], + *user_data: typing.Any, ) -> None: ... @staticmethod def foreach( - hash_table: dict[None, None], func: Callable[..., None], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., None], + *user_data: typing.Any, ) -> None: ... @staticmethod def foreach_remove( - hash_table: dict[None, None], func: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... @staticmethod def foreach_steal( - hash_table: dict[None, None], func: Callable[..., bool], *user_data: Any + hash_table: dict[None, None], + func: typing.Callable[..., bool], + *user_data: typing.Any, ) -> int: ... @staticmethod def insert(hash_table: dict[None, None], key: None, value: None) -> bool: ... @@ -1736,7 +1811,7 @@ class HashTable(GObject.GBoxed): @staticmethod def lookup_extended( hash_table: dict[None, None], lookup_key: None - ) -> Tuple[bool, None, None]: ... + ) -> typing.Tuple[bool, None, None]: ... @staticmethod def new_similar(other_hash_table: dict[None, None]) -> dict[None, None]: ... @staticmethod @@ -1756,7 +1831,7 @@ class HashTable(GObject.GBoxed): @staticmethod def steal_extended( hash_table: dict[None, None], lookup_key: None - ) -> Tuple[bool, None, None]: ... + ) -> typing.Tuple[bool, None, None]: ... @staticmethod def unref(hash_table: dict[None, None]) -> None: ... @@ -1777,7 +1852,7 @@ class HashTableIter(GObject.GPointer): dummy6: None = ... def get_hash_table(self) -> dict[None, None]: ... def init(self, hash_table: dict[None, None]) -> None: ... - def next(self) -> Tuple[bool, None, None]: ... + def next(self) -> typing.Tuple[bool, None, None]: ... def remove(self) -> None: ... def replace(self, value: None) -> None: ... def steal(self) -> None: ... @@ -1792,13 +1867,15 @@ class Hmac(GObject.GBoxed): """ def copy(self) -> Hmac: ... - def get_digest(self, buffer: Sequence[int]) -> None: ... + def get_digest(self, buffer: typing.Sequence[int]) -> None: ... def get_string(self) -> str: ... @classmethod - def new(cls, digest_type: ChecksumType, key: Sequence[int]) -> Optional[Hmac]: ... + def new( + cls, digest_type: ChecksumType, key: typing.Sequence[int] + ) -> typing.Optional[Hmac]: ... def ref(self) -> Hmac: ... def unref(self) -> None: ... - def update(self, data: Sequence[int]) -> None: ... + def update(self, data: typing.Sequence[int]) -> None: ... class Hook(GObject.GPointer): """ @@ -1816,7 +1893,7 @@ class Hook(GObject.GPointer): hook_id: int = ... flags: int = ... func: None = ... - destroy: Callable[[None], None] = ... + destroy: typing.Callable[[None], None] = ... def compare_ids(self, sibling: Hook) -> int: ... @staticmethod def destroy(hook_list: HookList, hook_id: int) -> bool: ... @@ -1826,11 +1903,11 @@ class Hook(GObject.GPointer): def free(hook_list: HookList, hook: Hook) -> None: ... @staticmethod def insert_before( - hook_list: HookList, sibling: Optional[Hook], hook: Hook + hook_list: HookList, sibling: typing.Optional[Hook], hook: Hook ) -> None: ... @staticmethod def insert_sorted( - hook_list: HookList, hook: Hook, func: Callable[[Hook, Hook], int] + hook_list: HookList, hook: Hook, func: typing.Callable[[Hook, Hook], int] ) -> None: ... @staticmethod def prepend(hook_list: HookList, hook: Hook) -> None: ... @@ -1851,17 +1928,23 @@ class HookList(GObject.GPointer): is_setup: int = ... hooks: Hook = ... dummy3: None = ... - finalize_hook: Callable[[HookList, Hook], None] = ... + finalize_hook: typing.Callable[[HookList, Hook], None] = ... dummy: list[None] = ... def clear(self) -> None: ... def init(self, hook_size: int) -> None: ... def invoke(self, may_recurse: bool) -> None: ... def invoke_check(self, may_recurse: bool) -> None: ... def marshal( - self, may_recurse: bool, marshaller: Callable[..., None], *marshal_data: Any + self, + may_recurse: bool, + marshaller: typing.Callable[..., None], + *marshal_data: typing.Any, ) -> None: ... def marshal_check( - self, may_recurse: bool, marshaller: Callable[..., bool], *marshal_data: Any + self, + may_recurse: bool, + marshaller: typing.Callable[..., bool], + *marshal_data: typing.Any, ) -> None: ... class IOChannel(GObject.GBoxed): @@ -1912,18 +1995,18 @@ class IOChannel(GObject.GBoxed): def get_close_on_unref(self) -> bool: ... def get_encoding(self) -> str: ... def get_flags(self) -> IOFlags: ... - def get_line_term(self) -> Tuple[str, int]: ... + def get_line_term(self) -> typing.Tuple[str, int]: ... def init(self) -> None: ... @classmethod def new_file(cls, filename: str, mode: str) -> IOChannel: ... def read(self, max_count=-1): ... # FIXME Function - def read_chars(self) -> Tuple[IOStatus, bytes, int]: ... - def read_line(self) -> Tuple[IOStatus, str, int, int]: ... + def read_chars(self) -> typing.Tuple[IOStatus, bytes, int]: ... + def read_line(self) -> typing.Tuple[IOStatus, str, int, int]: ... def read_line_string( - self, buffer: String, terminator_pos: Optional[int] = None + self, buffer: String, terminator_pos: typing.Optional[int] = None ) -> IOStatus: ... - def read_to_end(self) -> Tuple[IOStatus, bytes]: ... - def read_unichar(self) -> Tuple[IOStatus, str]: ... + def read_to_end(self) -> typing.Tuple[IOStatus, bytes]: ... + def read_unichar(self) -> typing.Tuple[IOStatus, str]: ... def readline(self, size_hint=-1): ... # FIXME Function def readlines(self, size_hint=-1): ... # FIXME Function def ref(self) -> IOChannel: ... @@ -1932,16 +2015,18 @@ class IOChannel(GObject.GBoxed): def set_buffer_size(self, size: int) -> None: ... def set_buffered(self, buffered: bool) -> None: ... def set_close_on_unref(self, do_close: bool) -> None: ... - def set_encoding(self, encoding: Optional[str] = None) -> IOStatus: ... + def set_encoding(self, encoding: typing.Optional[str] = None) -> IOStatus: ... def set_flags(self, flags: IOFlags) -> IOStatus: ... - def set_line_term(self, line_term: Optional[str], length: int) -> None: ... + def set_line_term(self, line_term: typing.Optional[str], length: int) -> None: ... def shutdown(self, flush: bool) -> IOStatus: ... def unix_get_fd(self) -> int: ... @classmethod def unix_new(cls, fd: int) -> IOChannel: ... def unref(self) -> None: ... def write(self, buf, buflen=-1): ... # FIXME Function - def write_chars(self, buf: Sequence[int], count: int) -> Tuple[IOStatus, int]: ... + def write_chars( + self, buf: typing.Sequence[int], count: int + ) -> typing.Tuple[IOStatus, int]: ... def write_unichar(self, thechar: str) -> IOStatus: ... def writelines(self, lines): ... # FIXME Function @@ -1954,14 +2039,14 @@ class IOFuncs(GObject.GPointer): IOFuncs() """ - io_read: Callable[[IOChannel, str, int, int], IOStatus] = ... - io_write: Callable[[IOChannel, str, int, int], IOStatus] = ... - io_seek: Callable[[IOChannel, int, SeekType], IOStatus] = ... - io_close: Callable[[IOChannel], IOStatus] = ... - io_create_watch: Callable[[IOChannel, IOCondition], Source] = ... - io_free: Callable[[IOChannel], None] = ... - io_set_flags: Callable[[IOChannel, IOFlags], IOStatus] = ... - io_get_flags: Callable[[IOChannel], IOFlags] = ... + io_read: typing.Callable[[IOChannel, str, int, int], IOStatus] = ... + io_write: typing.Callable[[IOChannel, str, int, int], IOStatus] = ... + io_seek: typing.Callable[[IOChannel, int, SeekType], IOStatus] = ... + io_close: typing.Callable[[IOChannel], IOStatus] = ... + io_create_watch: typing.Callable[[IOChannel, IOCondition], Source] = ... + io_free: typing.Callable[[IOChannel], None] = ... + io_set_flags: typing.Callable[[IOChannel, IOFlags], IOStatus] = ... + io_get_flags: typing.Callable[[IOChannel], IOFlags] = ... class Idle(GObject.GBoxed): """ @@ -1991,14 +2076,14 @@ class Idle(GObject.GBoxed): def add_child_source(self, child_source: Source) -> None: ... def add_poll(self, fd: PollFD) -> None: ... def add_unix_fd(self, fd: int, events: IOCondition) -> None: ... - def attach(self, context: Optional[MainContext] = None) -> int: ... + def attach(self, context: typing.Optional[MainContext] = None) -> int: ... def destroy(self) -> None: ... def finalize(self): ... # FIXME Function def get_can_recurse(self) -> bool: ... - def get_context(self) -> Optional[MainContext]: ... + def get_context(self) -> typing.Optional[MainContext]: ... def get_current_time(self): ... # FIXME Function def get_id(self) -> int: ... - def get_name(self) -> Optional[str]: ... + def get_name(self) -> typing.Optional[str]: ... def get_priority(self) -> int: ... def get_ready_time(self) -> int: ... def get_time(self) -> int: ... @@ -2045,25 +2130,25 @@ class KeyFile(GObject.GBoxed): def get_boolean(self, group_name: str, key: str) -> bool: ... def get_boolean_list(self, group_name: str, key: str) -> list[bool]: ... def get_comment( - self, group_name: Optional[str] = None, key: Optional[str] = None + self, group_name: typing.Optional[str] = None, key: typing.Optional[str] = None ) -> str: ... def get_double(self, group_name: str, key: str) -> float: ... def get_double_list(self, group_name: str, key: str) -> list[float]: ... - def get_groups(self) -> Tuple[list[str], int]: ... + def get_groups(self) -> typing.Tuple[list[str], int]: ... def get_int64(self, group_name: str, key: str) -> int: ... def get_integer(self, group_name: str, key: str) -> int: ... def get_integer_list(self, group_name: str, key: str) -> list[int]: ... - def get_keys(self, group_name: str) -> Tuple[list[str], int]: ... + def get_keys(self, group_name: str) -> typing.Tuple[list[str], int]: ... def get_locale_for_key( - self, group_name: str, key: str, locale: Optional[str] = None - ) -> Optional[str]: ... + self, group_name: str, key: str, locale: typing.Optional[str] = None + ) -> typing.Optional[str]: ... def get_locale_string( - self, group_name: str, key: str, locale: Optional[str] = None + self, group_name: str, key: str, locale: typing.Optional[str] = None ) -> str: ... def get_locale_string_list( - self, group_name: str, key: str, locale: Optional[str] = None + self, group_name: str, key: str, locale: typing.Optional[str] = None ) -> list[str]: ... - def get_start_group(self) -> Optional[str]: ... + def get_start_group(self) -> typing.Optional[str]: ... def get_string(self, group_name: str, key: str) -> str: ... def get_string_list(self, group_name: str, key: str) -> list[str]: ... def get_uint64(self, group_name: str, key: str) -> int: ... @@ -2073,49 +2158,49 @@ class KeyFile(GObject.GBoxed): def load_from_data(self, data: str, length: int, flags: KeyFileFlags) -> bool: ... def load_from_data_dirs( self, file: str, flags: KeyFileFlags - ) -> Tuple[bool, str]: ... + ) -> typing.Tuple[bool, str]: ... def load_from_dirs( - self, file: str, search_dirs: Sequence[str], flags: KeyFileFlags - ) -> Tuple[bool, str]: ... + self, file: str, search_dirs: typing.Sequence[str], flags: KeyFileFlags + ) -> typing.Tuple[bool, str]: ... def load_from_file(self, file: str, flags: KeyFileFlags) -> bool: ... @classmethod def new(cls) -> KeyFile: ... def remove_comment( - self, group_name: Optional[str] = None, key: Optional[str] = None + self, group_name: typing.Optional[str] = None, key: typing.Optional[str] = None ) -> bool: ... def remove_group(self, group_name: str) -> bool: ... def remove_key(self, group_name: str, key: str) -> bool: ... def save_to_file(self, filename: str) -> bool: ... def set_boolean(self, group_name: str, key: str, value: bool) -> None: ... def set_boolean_list( - self, group_name: str, key: str, list: Sequence[bool] + self, group_name: str, key: str, list: typing.Sequence[bool] ) -> None: ... def set_comment( - self, group_name: Optional[str], key: Optional[str], comment: str + self, group_name: typing.Optional[str], key: typing.Optional[str], comment: str ) -> bool: ... def set_double(self, group_name: str, key: str, value: float) -> None: ... def set_double_list( - self, group_name: str, key: str, list: Sequence[float] + self, group_name: str, key: str, list: typing.Sequence[float] ) -> None: ... def set_int64(self, group_name: str, key: str, value: int) -> None: ... def set_integer(self, group_name: str, key: str, value: int) -> None: ... def set_integer_list( - self, group_name: str, key: str, list: Sequence[int] + self, group_name: str, key: str, list: typing.Sequence[int] ) -> None: ... def set_list_separator(self, separator: int) -> None: ... def set_locale_string( self, group_name: str, key: str, locale: str, string: str ) -> None: ... def set_locale_string_list( - self, group_name: str, key: str, locale: str, list: Sequence[str] + self, group_name: str, key: str, locale: str, list: typing.Sequence[str] ) -> None: ... def set_string(self, group_name: str, key: str, string: str) -> None: ... def set_string_list( - self, group_name: str, key: str, list: Sequence[str] + self, group_name: str, key: str, list: typing.Sequence[str] ) -> None: ... def set_uint64(self, group_name: str, key: str, value: int) -> None: ... def set_value(self, group_name: str, key: str, value: str) -> None: ... - def to_data(self) -> Tuple[str, int]: ... + def to_data(self) -> typing.Tuple[str, int]: ... def unref(self) -> None: ... class List(GObject.GPointer): @@ -2160,7 +2245,7 @@ class MainContext(GObject.GBoxed): def acquire(self) -> bool: ... def add_poll(self, fd: PollFD, priority: int) -> None: ... - def check(self, max_priority: int, fds: Sequence[PollFD]) -> bool: ... + def check(self, max_priority: int, fds: typing.Sequence[PollFD]) -> bool: ... @staticmethod def default() -> MainContext: ... def dispatch(self) -> None: ... @@ -2170,9 +2255,9 @@ class MainContext(GObject.GBoxed): def find_source_by_id(self, source_id: int) -> Source: ... def find_source_by_user_data(self, user_data: None) -> Source: ... @staticmethod - def get_thread_default() -> Optional[MainContext]: ... + def get_thread_default() -> typing.Optional[MainContext]: ... def invoke_full( - self, priority: int, function: Callable[..., bool], *data: Any + self, priority: int, function: typing.Callable[..., bool], *data: typing.Any ) -> None: ... def is_owner(self) -> bool: ... # override @@ -2183,9 +2268,9 @@ class MainContext(GObject.GBoxed): def new_with_flags(cls, flags: MainContextFlags) -> MainContext: ... def pending(self) -> bool: ... def pop_thread_default(self) -> None: ... - def prepare(self) -> Tuple[bool, int]: ... + def prepare(self) -> typing.Tuple[bool, int]: ... def push_thread_default(self) -> None: ... - def query(self, max_priority: int) -> Tuple[int, int, list[PollFD]]: ... + def query(self, max_priority: int) -> typing.Tuple[int, int, list[PollFD]]: ... def ref(self) -> MainContext: ... @staticmethod def ref_thread_default() -> MainContext: ... @@ -2207,7 +2292,9 @@ class MainLoop(GObject.GBoxed): def get_context(self) -> MainContext: ... def is_running(self) -> bool: ... @classmethod - def new(cls, context: Optional[MainContext], is_running: bool) -> MainLoop: ... + def new( + cls, context: typing.Optional[MainContext], is_running: bool + ) -> MainLoop: ... def quit(self) -> None: ... def ref(self) -> MainLoop: ... def run(self): ... # FIXME Function @@ -2247,7 +2334,7 @@ class MarkupParseContext(GObject.GBoxed): def free(self) -> None: ... def get_element(self) -> str: ... def get_element_stack(self) -> list[str]: ... - def get_position(self) -> Tuple[int, int]: ... + def get_position(self) -> typing.Tuple[int, int]: ... def get_user_data(self) -> None: ... @classmethod def new( @@ -2255,7 +2342,7 @@ class MarkupParseContext(GObject.GBoxed): parser: MarkupParser, flags: MarkupParseFlags, user_data: None, - user_data_dnotify: Callable[[None], None], + user_data_dnotify: typing.Callable[[None], None], ) -> MarkupParseContext: ... def parse(self, text: str, text_len: int) -> bool: ... def pop(self) -> None: ... @@ -2272,19 +2359,19 @@ class MarkupParser(GObject.GPointer): MarkupParser() """ - start_element: Callable[..., None] = ... - end_element: Callable[..., None] = ... - text: Callable[..., None] = ... - passthrough: Callable[..., None] = ... - error: Callable[..., None] = ... + start_element: typing.Callable[..., None] = ... + end_element: typing.Callable[..., None] = ... + text: typing.Callable[..., None] = ... + passthrough: typing.Callable[..., None] = ... + error: typing.Callable[..., None] = ... class MatchInfo(GObject.GBoxed): - def expand_references(self, string_to_expand: str) -> Optional[str]: ... - def fetch(self, match_num: int) -> Optional[str]: ... + def expand_references(self, string_to_expand: str) -> typing.Optional[str]: ... + def fetch(self, match_num: int) -> typing.Optional[str]: ... def fetch_all(self) -> list[str]: ... - def fetch_named(self, name: str) -> Optional[str]: ... - def fetch_named_pos(self, name: str) -> Tuple[bool, int, int]: ... - def fetch_pos(self, match_num: int) -> Tuple[bool, int, int]: ... + def fetch_named(self, name: str) -> typing.Optional[str]: ... + def fetch_named_pos(self, name: str) -> typing.Tuple[bool, int, int]: ... + def fetch_pos(self, match_num: int) -> typing.Tuple[bool, int, int]: ... def free(self) -> None: ... def get_match_count(self) -> int: ... def get_regex(self) -> Regex: ... @@ -2315,12 +2402,12 @@ class MemVTable(GObject.GPointer): MemVTable() """ - malloc: Callable[[int], None] = ... - realloc: Callable[[None, int], None] = ... - free: Callable[[None], None] = ... - calloc: Callable[[int, int], None] = ... - try_malloc: Callable[[int], None] = ... - try_realloc: Callable[[None, int], None] = ... + malloc: typing.Callable[[int], None] = ... + realloc: typing.Callable[[None, int], None] = ... + free: typing.Callable[[None], None] = ... + calloc: typing.Callable[[int, int], None] = ... + try_malloc: typing.Callable[[int], None] = ... + try_realloc: typing.Callable[[None, int], None] = ... class Mutex(GObject.GPointer): i = ... # FIXME Constant @@ -2349,7 +2436,7 @@ class Node(GObject.GPointer): def child_index(self, data: None) -> int: ... def child_position(self, child: Node) -> int: ... def children_foreach( - self, flags: TraverseFlags, func: Callable[..., None], *data: Any + self, flags: TraverseFlags, func: typing.Callable[..., None], *data: typing.Any ) -> None: ... def depth(self) -> int: ... def destroy(self) -> None: ... @@ -2367,8 +2454,8 @@ class Node(GObject.GPointer): order: TraverseType, flags: TraverseFlags, max_depth: int, - func: Callable[..., bool], - *data: Any, + func: typing.Callable[..., bool], + *data: typing.Any, ) -> None: ... def unlink(self) -> None: ... @@ -2384,7 +2471,7 @@ class Once(GObject.GPointer): status: OnceStatus = ... retval: None = ... @staticmethod - def init_enter() -> Tuple[bool, None]: ... + def init_enter() -> typing.Tuple[bool, None]: ... @staticmethod def init_enter_impl(location: int) -> bool: ... @staticmethod @@ -2436,18 +2523,18 @@ class PathBuf(GObject.GPointer): dummy: list[None] = ... def clear(self) -> None: ... - def clear_to_path(self) -> Optional[str]: ... + def clear_to_path(self) -> typing.Optional[str]: ... @staticmethod def equal(v1: None, v2: None) -> bool: ... def free(self) -> None: ... - def free_to_path(self) -> Optional[str]: ... + def free_to_path(self) -> typing.Optional[str]: ... def init(self) -> PathBuf: ... - def init_from_path(self, path: Optional[str] = None) -> PathBuf: ... + def init_from_path(self, path: typing.Optional[str] = None) -> PathBuf: ... def pop(self) -> bool: ... def push(self, path: str) -> PathBuf: ... - def set_extension(self, extension: Optional[str] = None) -> bool: ... + def set_extension(self, extension: typing.Optional[str] = None) -> bool: ... def set_filename(self, file_name: str) -> bool: ... - def to_path(self) -> Optional[str]: ... + def to_path(self) -> typing.Optional[str]: ... class PatternSpec(GObject.GBoxed): """ @@ -2462,7 +2549,10 @@ class PatternSpec(GObject.GBoxed): def equal(self, pspec2: PatternSpec) -> bool: ... def free(self) -> None: ... def match( - self, string_length: int, string: str, string_reversed: Optional[str] = None + self, + string_length: int, + string: str, + string_reversed: typing.Optional[str] = None, ) -> bool: ... def match_string(self, string: str) -> bool: ... @classmethod @@ -2508,7 +2598,7 @@ class Private(GObject.GPointer): """ p: None = ... - notify: Callable[[None], None] = ... + notify: typing.Callable[[None], None] = ... future: list[None] = ... def get(self) -> None: ... def replace(self, value: None) -> None: ... @@ -2540,16 +2630,18 @@ class Queue(GObject.GPointer): length: int = ... def clear(self) -> None: ... def clear_full( - self, free_func: Optional[Callable[[None], None]] = None + self, free_func: typing.Optional[typing.Callable[[None], None]] = None + ) -> None: ... + def foreach( + self, func: typing.Callable[..., None], *user_data: typing.Any ) -> None: ... - def foreach(self, func: Callable[..., None], *user_data: Any) -> None: ... def free(self) -> None: ... - def free_full(self, free_func: Callable[[None], None]) -> None: ... + def free_full(self, free_func: typing.Callable[[None], None]) -> None: ... def get_length(self) -> int: ... def index(self, data: None) -> int: ... def init(self) -> None: ... def insert_sorted( - self, data: None, func: Callable[..., int], *user_data: Any + self, data: None, func: typing.Callable[..., int], *user_data: typing.Any ) -> None: ... def is_empty(self) -> bool: ... def peek_head(self) -> None: ... @@ -2564,7 +2656,9 @@ class Queue(GObject.GPointer): def remove(self, data: None) -> bool: ... def remove_all(self, data: None) -> int: ... def reverse(self) -> None: ... - def sort(self, compare_func: Callable[..., int], *user_data: Any) -> None: ... + def sort( + self, compare_func: typing.Callable[..., int], *user_data: typing.Any + ) -> None: ... class RWLock(GObject.GPointer): """ @@ -2639,7 +2733,7 @@ class Regex(GObject.GBoxed): """ @staticmethod - def check_replacement(replacement: str) -> Tuple[bool, bool]: ... + def check_replacement(replacement: str) -> typing.Tuple[bool, bool]: ... @staticmethod def error_quark() -> int: ... @staticmethod @@ -2656,16 +2750,22 @@ class Regex(GObject.GBoxed): def get_string_number(self, name: str) -> int: ... def match( self, string: str, match_options: RegexMatchFlags - ) -> Tuple[bool, MatchInfo]: ... + ) -> typing.Tuple[bool, MatchInfo]: ... def match_all( self, string: str, match_options: RegexMatchFlags - ) -> Tuple[bool, MatchInfo]: ... + ) -> typing.Tuple[bool, MatchInfo]: ... def match_all_full( - self, string: Sequence[str], start_position: int, match_options: RegexMatchFlags - ) -> Tuple[bool, MatchInfo]: ... + self, + string: typing.Sequence[str], + start_position: int, + match_options: RegexMatchFlags, + ) -> typing.Tuple[bool, MatchInfo]: ... def match_full( - self, string: Sequence[str], start_position: int, match_options: RegexMatchFlags - ) -> Tuple[bool, MatchInfo]: ... + self, + string: typing.Sequence[str], + start_position: int, + match_options: RegexMatchFlags, + ) -> typing.Tuple[bool, MatchInfo]: ... @staticmethod def match_simple( pattern: str, @@ -2679,26 +2779,26 @@ class Regex(GObject.GBoxed): pattern: str, compile_options: RegexCompileFlags, match_options: RegexMatchFlags, - ) -> Optional[Regex]: ... + ) -> typing.Optional[Regex]: ... def ref(self) -> Regex: ... def replace( self, - string: Sequence[str], + string: typing.Sequence[str], start_position: int, replacement: str, match_options: RegexMatchFlags, ) -> str: ... def replace_eval( self, - string: Sequence[str], + string: typing.Sequence[str], start_position: int, match_options: RegexMatchFlags, - eval: Callable[..., bool], - *user_data: Any, + eval: typing.Callable[..., bool], + *user_data: typing.Any, ) -> str: ... def replace_literal( self, - string: Sequence[str], + string: typing.Sequence[str], start_position: int, replacement: str, match_options: RegexMatchFlags, @@ -2706,7 +2806,7 @@ class Regex(GObject.GBoxed): def split(self, string: str, match_options: RegexMatchFlags) -> list[str]: ... def split_full( self, - string: Sequence[str], + string: typing.Sequence[str], start_position: int, match_options: RegexMatchFlags, max_tokens: int, @@ -2771,7 +2871,7 @@ class Scanner(GObject.GPointer): text_end: str = ... buffer: str = ... scope_id: int = ... - msg_handler: Callable[[Scanner, str, bool], None] = ... + msg_handler: typing.Callable[[Scanner, str, bool], None] = ... def cur_line(self) -> int: ... def cur_position(self) -> int: ... def cur_token(self) -> TokenType: ... @@ -2784,7 +2884,7 @@ class Scanner(GObject.GPointer): def peek_next_token(self) -> TokenType: ... def scope_add_symbol(self, scope_id: int, symbol: str, value: None) -> None: ... def scope_foreach_symbol( - self, scope_id: int, func: Callable[..., None], *user_data: Any + self, scope_id: int, func: typing.Callable[..., None], *user_data: typing.Any ) -> None: ... def scope_lookup_symbol(self, scope_id: int, symbol: str) -> None: ... def scope_remove_symbol(self, scope_id: int, symbol: str) -> None: ... @@ -2839,13 +2939,15 @@ class ScannerConfig(GObject.GPointer): class Sequence(GObject.GPointer): def append(self, data: None) -> SequenceIter: ... - def foreach(self, func: Callable[..., None], *user_data: Any) -> None: ... + def foreach( + self, func: typing.Callable[..., None], *user_data: typing.Any + ) -> None: ... @staticmethod def foreach_range( begin: SequenceIter, end: SequenceIter, - func: Callable[..., None], - *user_data: Any, + func: typing.Callable[..., None], + *user_data: typing.Any, ) -> None: ... def free(self) -> None: ... @staticmethod @@ -2857,18 +2959,18 @@ class Sequence(GObject.GPointer): @staticmethod def insert_before(iter: SequenceIter, data: None) -> SequenceIter: ... def insert_sorted( - self, data: None, cmp_func: Callable[..., int], *cmp_data: Any + self, data: None, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any ) -> SequenceIter: ... def insert_sorted_iter( - self, data: None, iter_cmp: Callable[..., int], *cmp_data: Any + self, data: None, iter_cmp: typing.Callable[..., int], *cmp_data: typing.Any ) -> SequenceIter: ... def is_empty(self) -> bool: ... def lookup( - self, data: None, cmp_func: Callable[..., int], *cmp_data: Any - ) -> Optional[SequenceIter]: ... + self, data: None, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any + ) -> typing.Optional[SequenceIter]: ... def lookup_iter( - self, data: None, iter_cmp: Callable[..., int], *cmp_data: Any - ) -> Optional[SequenceIter]: ... + self, data: None, iter_cmp: typing.Callable[..., int], *cmp_data: typing.Any + ) -> typing.Optional[SequenceIter]: ... @staticmethod def move(src: SequenceIter, dest: SequenceIter) -> None: ... @staticmethod @@ -2883,23 +2985,27 @@ class Sequence(GObject.GPointer): @staticmethod def remove_range(begin: SequenceIter, end: SequenceIter) -> None: ... def search( - self, data: None, cmp_func: Callable[..., int], *cmp_data: Any + self, data: None, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any ) -> SequenceIter: ... def search_iter( - self, data: None, iter_cmp: Callable[..., int], *cmp_data: Any + self, data: None, iter_cmp: typing.Callable[..., int], *cmp_data: typing.Any ) -> SequenceIter: ... @staticmethod def set(iter: SequenceIter, data: None) -> None: ... - def sort(self, cmp_func: Callable[..., int], *cmp_data: Any) -> None: ... + def sort( + self, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any + ) -> None: ... @staticmethod def sort_changed( - iter: SequenceIter, cmp_func: Callable[..., int], *cmp_data: Any + iter: SequenceIter, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any ) -> None: ... @staticmethod def sort_changed_iter( - iter: SequenceIter, iter_cmp: Callable[..., int], *cmp_data: Any + iter: SequenceIter, iter_cmp: typing.Callable[..., int], *cmp_data: typing.Any + ) -> None: ... + def sort_iter( + self, cmp_func: typing.Callable[..., int], *cmp_data: typing.Any ) -> None: ... - def sort_iter(self, cmp_func: Callable[..., int], *cmp_data: Any) -> None: ... @staticmethod def swap(a: SequenceIter, b: SequenceIter) -> None: ... @@ -2941,14 +3047,14 @@ class Source(GObject.GBoxed): def add_child_source(self, child_source: Source) -> None: ... def add_poll(self, fd: PollFD) -> None: ... def add_unix_fd(self, fd: int, events: IOCondition) -> None: ... - def attach(self, context: Optional[MainContext] = None) -> int: ... + def attach(self, context: typing.Optional[MainContext] = None) -> int: ... def destroy(self) -> None: ... def finalize(self): ... # FIXME Function def get_can_recurse(self) -> bool: ... - def get_context(self) -> Optional[MainContext]: ... + def get_context(self) -> typing.Optional[MainContext]: ... def get_current_time(self): ... # FIXME Function def get_id(self) -> int: ... - def get_name(self) -> Optional[str]: ... + def get_name(self) -> typing.Optional[str]: ... def get_priority(self) -> int: ... def get_ready_time(self) -> int: ... def get_time(self) -> int: ... @@ -2990,8 +3096,8 @@ class SourceCallbackFuncs(GObject.GPointer): SourceCallbackFuncs() """ - ref: Callable[[None], None] = ... - unref: Callable[[None], None] = ... + ref: typing.Callable[[None], None] = ... + unref: typing.Callable[[None], None] = ... get: None = ... class SourceFuncs(GObject.GPointer): @@ -3003,12 +3109,12 @@ class SourceFuncs(GObject.GPointer): SourceFuncs() """ - prepare: Callable[[Source, int], bool] = ... - check: Callable[[Source], bool] = ... + prepare: typing.Callable[[Source, int], bool] = ... + check: typing.Callable[[Source], bool] = ... dispatch: None = ... - finalize: Callable[[Source], None] = ... - closure_callback: Callable[..., bool] = ... - closure_marshal: Callable[[], None] = ... + finalize: typing.Callable[[Source], None] = ... + closure_callback: typing.Callable[..., bool] = ... + closure_marshal: typing.Callable[[], None] = ... class SourcePrivate(GObject.GPointer): ... class StatBuf(GObject.GPointer): ... @@ -3042,7 +3148,7 @@ class String(GObject.GBoxed): def down(self) -> String: ... def equal(self, v2: String) -> bool: ... def erase(self, pos: int, len: int) -> String: ... - def free(self, free_segment: bool) -> Optional[str]: ... + def free(self, free_segment: bool) -> typing.Optional[str]: ... def free_and_steal(self) -> str: ... def free_to_bytes(self) -> Bytes: ... def hash(self) -> int: ... @@ -3051,11 +3157,11 @@ class String(GObject.GBoxed): def insert_len(self, pos: int, val: str, len: int) -> String: ... def insert_unichar(self, pos: int, wc: str) -> String: ... @classmethod - def new(cls, init: Optional[str] = None) -> String: ... + def new(cls, init: typing.Optional[str] = None) -> String: ... @classmethod def new_len(cls, init: str, len: int) -> String: ... @classmethod - def new_take(cls, init: Optional[str] = None) -> String: ... + def new_take(cls, init: typing.Optional[str] = None) -> String: ... def overwrite(self, pos: int, val: str) -> String: ... def overwrite_len(self, pos: int, val: str, len: int) -> String: ... def prepend(self, val: str) -> String: ... @@ -3086,7 +3192,7 @@ class StrvBuilder(GObject.GBoxed): """ def add(self, value: str) -> None: ... - def addv(self, value: Sequence[str]) -> None: ... + def addv(self, value: typing.Sequence[str]) -> None: ... def end(self) -> list[str]: ... @classmethod def new(cls) -> StrvBuilder: ... @@ -3159,7 +3265,7 @@ class Thread(GObject.GBoxed): try_new(name:str=None, func:GLib.ThreadFunc, data=None) -> GLib.Thread """ - func: Callable[[None], None] = ... + func: typing.Callable[[None], None] = ... data: None = ... joinable: bool = ... priority: None = ... @@ -3170,14 +3276,20 @@ class Thread(GObject.GBoxed): def join(self) -> None: ... @classmethod def new( - cls, name: Optional[str], func: Callable[..., None], *data: Any + cls, + name: typing.Optional[str], + func: typing.Callable[..., None], + *data: typing.Any, ) -> Thread: ... def ref(self) -> Thread: ... @staticmethod def self() -> Thread: ... @classmethod def try_new( - cls, name: Optional[str], func: Callable[..., None], *data: Any + cls, + name: typing.Optional[str], + func: typing.Callable[..., None], + *data: typing.Any, ) -> Thread: ... def unref(self) -> None: ... @staticmethod @@ -3192,7 +3304,7 @@ class ThreadPool(GObject.GPointer): ThreadPool() """ - func: Callable[..., None] = ... + func: typing.Callable[..., None] = ... user_data: None = ... exclusive: bool = ... def free(self, immediate: bool, wait_: bool) -> None: ... @@ -3228,8 +3340,8 @@ class TimeVal(GObject.GPointer): tv_usec: int = ... def add(self, microseconds: int) -> None: ... @staticmethod - def from_iso8601(iso_date: str) -> Tuple[bool, TimeVal]: ... - def to_iso8601(self) -> Optional[str]: ... + def from_iso8601(iso_date: str) -> typing.Tuple[bool, TimeVal]: ... + def to_iso8601(self) -> typing.Optional[str]: ... class TimeZone(GObject.GBoxed): """ @@ -3244,16 +3356,18 @@ class TimeZone(GObject.GBoxed): new_utc() -> GLib.TimeZone """ - def adjust_time(self, type: TimeType) -> Tuple[int, int]: ... + def adjust_time(self, type: TimeType) -> typing.Tuple[int, int]: ... def find_interval(self, type: TimeType, time_: int) -> int: ... def get_abbreviation(self, interval: int) -> str: ... def get_identifier(self) -> str: ... def get_offset(self, interval: int) -> int: ... def is_dst(self, interval: int) -> bool: ... @classmethod - def new(cls, identifier: Optional[str] = None) -> TimeZone: ... + def new(cls, identifier: typing.Optional[str] = None) -> TimeZone: ... @classmethod - def new_identifier(cls, identifier: Optional[str] = None) -> Optional[TimeZone]: ... + def new_identifier( + cls, identifier: typing.Optional[str] = None + ) -> typing.Optional[TimeZone]: ... @classmethod def new_local(cls) -> TimeZone: ... @classmethod @@ -3291,14 +3405,14 @@ class Timeout(GObject.GBoxed): def add_child_source(self, child_source: Source) -> None: ... def add_poll(self, fd: PollFD) -> None: ... def add_unix_fd(self, fd: int, events: IOCondition) -> None: ... - def attach(self, context: Optional[MainContext] = None) -> int: ... + def attach(self, context: typing.Optional[MainContext] = None) -> int: ... def destroy(self) -> None: ... def finalize(self): ... # FIXME Function def get_can_recurse(self) -> bool: ... - def get_context(self) -> Optional[MainContext]: ... + def get_context(self) -> typing.Optional[MainContext]: ... def get_current_time(self): ... # FIXME Function def get_id(self) -> int: ... - def get_name(self) -> Optional[str]: ... + def get_name(self) -> typing.Optional[str]: ... def get_priority(self) -> int: ... def get_ready_time(self) -> int: ... def get_time(self) -> int: ... @@ -3383,48 +3497,54 @@ class Tree(GObject.GBoxed): """ def destroy(self) -> None: ... - def foreach(self, func: Callable[..., bool], *user_data: Any) -> None: ... - def foreach_node(self, func: Callable[..., bool], *user_data: Any) -> None: ... + def foreach( + self, func: typing.Callable[..., bool], *user_data: typing.Any + ) -> None: ... + def foreach_node( + self, func: typing.Callable[..., bool], *user_data: typing.Any + ) -> None: ... def height(self) -> int: ... def insert(self, key: None, value: None) -> None: ... - def insert_node(self, key: None, value: None) -> Optional[TreeNode]: ... + def insert_node(self, key: None, value: None) -> typing.Optional[TreeNode]: ... def lookup(self, key: None) -> None: ... - def lookup_extended(self, lookup_key: None) -> Tuple[bool, None, None]: ... - def lookup_node(self, key: None) -> Optional[TreeNode]: ... - def lower_bound(self, key: None) -> Optional[TreeNode]: ... + def lookup_extended(self, lookup_key: None) -> typing.Tuple[bool, None, None]: ... + def lookup_node(self, key: None) -> typing.Optional[TreeNode]: ... + def lower_bound(self, key: None) -> typing.Optional[TreeNode]: ... @classmethod def new_full( cls, - key_compare_func: Callable[..., int], - key_destroy_func: Callable[[None], None], - *key_compare_data: Any, + key_compare_func: typing.Callable[..., int], + key_destroy_func: typing.Callable[[None], None], + *key_compare_data: typing.Any, ) -> Tree: ... def nnodes(self) -> int: ... - def node_first(self) -> Optional[TreeNode]: ... - def node_last(self) -> Optional[TreeNode]: ... + def node_first(self) -> typing.Optional[TreeNode]: ... + def node_last(self) -> typing.Optional[TreeNode]: ... def ref(self) -> Tree: ... def remove(self, key: None) -> bool: ... def remove_all(self) -> None: ... def replace(self, key: None, value: None) -> None: ... - def replace_node(self, key: None, value: None) -> Optional[TreeNode]: ... - def search(self, search_func: Callable[..., int], *user_data: Any) -> None: ... + def replace_node(self, key: None, value: None) -> typing.Optional[TreeNode]: ... + def search( + self, search_func: typing.Callable[..., int], *user_data: typing.Any + ) -> None: ... def search_node( - self, search_func: Callable[..., int], *user_data: Any - ) -> Optional[TreeNode]: ... + self, search_func: typing.Callable[..., int], *user_data: typing.Any + ) -> typing.Optional[TreeNode]: ... def steal(self, key: None) -> bool: ... def traverse( self, - traverse_func: Callable[..., bool], + traverse_func: typing.Callable[..., bool], traverse_type: TraverseType, - *user_data: Any, + *user_data: typing.Any, ) -> None: ... def unref(self) -> None: ... - def upper_bound(self, key: None) -> Optional[TreeNode]: ... + def upper_bound(self, key: None) -> typing.Optional[TreeNode]: ... class TreeNode(GObject.GPointer): def key(self) -> None: ... - def next(self) -> Optional[TreeNode]: ... - def previous(self) -> Optional[TreeNode]: ... + def next(self) -> typing.Optional[TreeNode]: ... + def previous(self) -> typing.Optional[TreeNode]: ... def value(self) -> None: ... class Tuples(GObject.GPointer): @@ -3456,72 +3576,73 @@ class Uri(GObject.GBoxed): def build( flags: UriFlags, scheme: str, - userinfo: Optional[str], - host: Optional[str], + userinfo: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> Uri: ... @staticmethod def build_with_user( flags: UriFlags, scheme: str, - user: Optional[str], - password: Optional[str], - auth_params: Optional[str], - host: Optional[str], + user: typing.Optional[str], + password: typing.Optional[str], + auth_params: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> Uri: ... @staticmethod def error_quark() -> int: ... @staticmethod def escape_bytes( - unescaped: Sequence[int], reserved_chars_allowed: Optional[str] = None + unescaped: typing.Sequence[int], + reserved_chars_allowed: typing.Optional[str] = None, ) -> str: ... @staticmethod def escape_string( - unescaped: str, reserved_chars_allowed: Optional[str], allow_utf8: bool + unescaped: str, reserved_chars_allowed: typing.Optional[str], allow_utf8: bool ) -> str: ... - def get_auth_params(self) -> Optional[str]: ... + def get_auth_params(self) -> typing.Optional[str]: ... def get_flags(self) -> UriFlags: ... - def get_fragment(self) -> Optional[str]: ... - def get_host(self) -> Optional[str]: ... - def get_password(self) -> Optional[str]: ... + def get_fragment(self) -> typing.Optional[str]: ... + def get_host(self) -> typing.Optional[str]: ... + def get_password(self) -> typing.Optional[str]: ... def get_path(self) -> str: ... def get_port(self) -> int: ... - def get_query(self) -> Optional[str]: ... + def get_query(self) -> typing.Optional[str]: ... def get_scheme(self) -> str: ... - def get_user(self) -> Optional[str]: ... - def get_userinfo(self) -> Optional[str]: ... + def get_user(self) -> typing.Optional[str]: ... + def get_userinfo(self) -> typing.Optional[str]: ... @staticmethod def is_valid(uri_string: str, flags: UriFlags) -> bool: ... @staticmethod def join( flags: UriFlags, - scheme: Optional[str], - userinfo: Optional[str], - host: Optional[str], + scheme: typing.Optional[str], + userinfo: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> str: ... @staticmethod def join_with_user( flags: UriFlags, - scheme: Optional[str], - user: Optional[str], - password: Optional[str], - auth_params: Optional[str], - host: Optional[str], + scheme: typing.Optional[str], + user: typing.Optional[str], + password: typing.Optional[str], + auth_params: typing.Optional[str], + host: typing.Optional[str], port: int, path: str, - query: Optional[str] = None, - fragment: Optional[str] = None, + query: typing.Optional[str] = None, + fragment: typing.Optional[str] = None, ) -> str: ... @staticmethod def list_extract_uris(uri_list: str) -> list[str]: ... @@ -3533,41 +3654,43 @@ class Uri(GObject.GBoxed): ) -> dict[str, str]: ... def parse_relative(self, uri_ref: str, flags: UriFlags) -> Uri: ... @staticmethod - def parse_scheme(uri: str) -> Optional[str]: ... + def parse_scheme(uri: str) -> typing.Optional[str]: ... @staticmethod - def peek_scheme(uri: str) -> Optional[str]: ... + def peek_scheme(uri: str) -> typing.Optional[str]: ... @staticmethod def resolve_relative( - base_uri_string: Optional[str], uri_ref: str, flags: UriFlags + base_uri_string: typing.Optional[str], uri_ref: str, flags: UriFlags ) -> str: ... @staticmethod def split( uri_ref: str, flags: UriFlags - ) -> Tuple[bool, str, str, str, int, str, str, str]: ... + ) -> typing.Tuple[bool, str, str, str, int, str, str, str]: ... @staticmethod def split_network( uri_string: str, flags: UriFlags - ) -> Tuple[bool, str, str, int]: ... + ) -> typing.Tuple[bool, str, str, int]: ... @staticmethod def split_with_user( uri_ref: str, flags: UriFlags - ) -> Tuple[bool, str, str, str, str, str, int, str, str, str]: ... + ) -> typing.Tuple[bool, str, str, str, str, str, int, str, str, str]: ... def to_string(self) -> str: ... def to_string_partial(self, flags: UriHideFlags) -> str: ... @staticmethod def unescape_bytes( - escaped_string: str, length: int, illegal_characters: Optional[str] = None + escaped_string: str, + length: int, + illegal_characters: typing.Optional[str] = None, ) -> Bytes: ... @staticmethod def unescape_segment( - escaped_string: Optional[str] = None, - escaped_string_end: Optional[str] = None, - illegal_characters: Optional[str] = None, - ) -> Optional[str]: ... + escaped_string: typing.Optional[str] = None, + escaped_string_end: typing.Optional[str] = None, + illegal_characters: typing.Optional[str] = None, + ) -> typing.Optional[str]: ... @staticmethod def unescape_string( - escaped_string: str, illegal_characters: Optional[str] = None - ) -> Optional[str]: ... + escaped_string: str, illegal_characters: typing.Optional[str] = None + ) -> typing.Optional[str]: ... class UriParamsIter(GObject.GPointer): """ @@ -3585,7 +3708,7 @@ class UriParamsIter(GObject.GPointer): def init( self, params: str, length: int, separators: str, flags: UriParamsFlags ) -> None: ... - def next(self) -> Tuple[bool, str, str]: ... + def next(self) -> typing.Tuple[bool, str, str]: ... # override class Variant(GObject.GPointer): @@ -3621,8 +3744,7 @@ class Variant(GObject.GPointer): new_variant(value:GLib.Variant) -> GLib.Variant """ - # override - def __init__(self, format_string: str, value: Any): ... + def __init__(self, format_string: str, value: typing.Any): ... def byteswap(self) -> Variant: ... def check_format_string(self, format_string: str, copy_only: bool) -> bool: ... def classify(self) -> VariantClass: ... @@ -3630,7 +3752,7 @@ class Variant(GObject.GPointer): def dup_bytestring(self) -> bytes: ... def dup_bytestring_array(self) -> list[str]: ... def dup_objv(self) -> list[str]: ... - def dup_string(self) -> Tuple[str, int]: ... + def dup_string(self) -> typing.Tuple[str, int]: ... def dup_strv(self) -> list[str]: ... def equal(self, two: Variant) -> bool: ... def get_boolean(self) -> bool: ... @@ -3645,11 +3767,10 @@ class Variant(GObject.GPointer): def get_int16(self) -> int: ... def get_int32(self) -> int: ... def get_int64(self) -> int: ... - def get_maybe(self) -> Optional[Variant]: ... + def get_maybe(self) -> typing.Optional[Variant]: ... def get_normal_form(self) -> Variant: ... def get_objv(self) -> list[str]: ... def get_size(self) -> int: ... - # override def get_string(self) -> str: ... def get_strv(self) -> list[str]: ... def get_type(self) -> VariantType: ... @@ -3667,16 +3788,16 @@ class Variant(GObject.GPointer): def is_of_type(self, type: VariantType) -> bool: ... @staticmethod def is_signature(string: str) -> bool: ... - def keys(self): ... # FIXME Function + def keys(self): ... def lookup_value( - self, key: str, expected_type: Optional[VariantType] = None + self, key: str, expected_type: typing.Optional[VariantType] = None ) -> Variant: ... def n_children(self) -> int: ... @classmethod def new_array( cls, - child_type: Optional[VariantType] = None, - children: Optional[Sequence[Variant]] = None, + child_type: typing.Optional[VariantType] = None, + children: typing.Optional[Sequence[Variant]] = None, ) -> Variant: ... @classmethod def new_boolean(cls, value: bool) -> Variant: ... @@ -3708,7 +3829,7 @@ class Variant(GObject.GPointer): type: VariantType, data: Sequence[int], trusted: bool, - notify: Callable[[None], None], + notify: typing.Callable[[None], None], user_data: None, ) -> Variant: ... @classmethod @@ -3721,7 +3842,9 @@ class Variant(GObject.GPointer): def new_int64(cls, value: int) -> Variant: ... @classmethod def new_maybe( - cls, child_type: Optional[VariantType] = None, child: Optional[Variant] = None + cls, + child_type: typing.Optional[VariantType] = None, + child: typing.Optional[Variant] = None, ) -> Variant: ... @classmethod def new_object_path(cls, object_path: str) -> Variant: ... @@ -3733,7 +3856,6 @@ class Variant(GObject.GPointer): def new_string(cls, string: str) -> Variant: ... @classmethod def new_strv(cls, strv: Sequence[str]) -> Variant: ... - # override @classmethod def new_tuple(cls, children: Variant) -> Variant: ... @classmethod @@ -3746,10 +3868,10 @@ class Variant(GObject.GPointer): def new_variant(cls, value: Variant) -> Variant: ... @staticmethod def parse( - type: Optional[VariantType], + type: typing.Optional[VariantType], text: str, - limit: Optional[str] = None, - endptr: Optional[str] = None, + limit: typing.Optional[str] = None, + endptr: typing.Optional[str] = None, ) -> Variant: ... @staticmethod def parse_error_print_context(error: Error, source_str: str) -> str: ... @@ -3760,15 +3882,12 @@ class Variant(GObject.GPointer): def print_(self, type_annotate: bool) -> str: ... def ref(self) -> Variant: ... def ref_sink(self) -> Variant: ... - def split_signature(signature): ... # FIXME Function + def split_signature(signature): ... def store(self, data: None) -> None: ... def take_ref(self) -> Variant: ... - # override - def unpack(self) -> Any: ... + def unpack(self) -> typing.Any: ... def unref(self) -> None: ... - # override - def __getitem__(self, key: Any) -> Any: ... - # override + def __getitem__(self, key: typing.Any) -> typing.Any: ... def __len__(self) -> int: ... class VariantBuilder(GObject.GBoxed): @@ -3805,10 +3924,10 @@ class VariantDict(GObject.GBoxed): def end(self) -> Variant: ... def insert_value(self, key: str, value: Variant) -> None: ... def lookup_value( - self, key: str, expected_type: Optional[VariantType] = None - ) -> Optional[Variant]: ... + self, key: str, expected_type: typing.Optional[VariantType] = None + ) -> typing.Optional[Variant]: ... @classmethod - def new(cls, from_asv: Optional[Variant] = None) -> VariantDict: ... + def new(cls, from_asv: typing.Optional[Variant] = None) -> VariantDict: ... def ref(self) -> VariantDict: ... def remove(self, key: str) -> bool: ... def unref(self) -> None: ... @@ -3858,14 +3977,16 @@ class VariantType(GObject.GBoxed): @classmethod def new_maybe(cls, element: VariantType) -> VariantType: ... @classmethod - def new_tuple(cls, items: Sequence[VariantType]) -> VariantType: ... + def new_tuple(cls, items: typing.Sequence[VariantType]) -> VariantType: ... def next(self) -> VariantType: ... @staticmethod def string_get_depth_(type_string: str) -> int: ... @staticmethod def string_is_valid(type_string: str) -> bool: ... @staticmethod - def string_scan(string: str, limit: Optional[str] = None) -> Tuple[bool, str]: ... + def string_scan( + string: str, limit: typing.Optional[str] = None + ) -> typing.Tuple[bool, str]: ... def value(self) -> VariantType: ... class AsciiType(GObject.GFlags):