Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include a Python stub file for the interrogatedb module #4

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/macros/Python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function(add_python_target target)

if(PYTHON_ARCH_INSTALL_DIR)
install(TARGETS ${target} EXPORT "${export}" COMPONENT "${component}" DESTINATION "${PYTHON_ARCH_INSTALL_DIR}${slash_namespace}")
install(FILES "${basename}.pyi" OPTIONAL COMPONENT "${component}" DESTINATION "${PYTHON_ARCH_INSTALL_DIR}${slash_namespace}")
endif()

else()
Expand Down
180 changes: 180 additions & 0 deletions src/interrogatedb/interrogatedb.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
def interrogate_request_database(database_filename: str) -> None: ...
def interrogate_request_module(def_: int) -> None: ...
def interrogate_add_search_directory(dirname: str) -> None: ...
def interrogate_add_search_path(pathstring: str) -> None: ...
def interrogate_error_flag() -> bool: ...

# Manifest Symbols
def interrogate_number_of_manifests() -> int: ...
def interrogate_get_manifest(n: int) -> int: ...
def interrogate_get_manifest_by_name(manifest_name: str) -> int: ...
def interrogate_manifest_name(manifest: int) -> str: ...
def interrogate_manifest_definition(manifest: int) -> str: ...
def interrogate_manifest_has_type(manifest: int) -> bool: ...
def interrogate_manifest_get_type(manifest: int) -> int: ...
def interrogate_manifest_has_getter(manifest: int) -> bool: ...
def interrogate_manifest_getter(manifest: int) -> int: ...
def interrogate_manifest_has_int_value(manifest: int) -> bool: ...
def interrogate_manifest_get_int_value(manifest: int) -> int: ...

# Data Elements
def interrogate_element_name(element: int) -> str: ...
def interrogate_element_scoped_name(element: int) -> str: ...
def interrogate_element_has_comment(element: int) -> bool: ...
def interrogate_element_comment(element: int) -> str: ...
def interrogate_get_element_by_name(element_name: str) -> int: ...
def interrogate_get_element_by_scoped_name(element_name: str) -> int: ...
def interrogate_element_type(element: int) -> int: ...
def interrogate_element_has_getter(element: int) -> bool: ...
def interrogate_element_getter(element: int) -> int: ...
def interrogate_element_has_setter(element: int) -> bool: ...
def interrogate_element_setter(element: int) -> int: ...
def interrogate_element_has_has_function(element: int) -> bool: ...
def interrogate_element_has_function(element: int) -> int: ...
def interrogate_element_has_clear_function(element: int) -> bool: ...
def interrogate_element_clear_function(element: int) -> int: ...
def interrogate_element_has_del_function(element: int) -> bool: ...
def interrogate_element_del_function(element: int) -> int: ...
def interrogate_element_has_insert_function(element: int) -> bool: ...
def interrogate_element_insert_function(element: int) -> int: ...
def interrogate_element_has_getkey_function(element: int) -> bool: ...
def interrogate_element_getkey_function(element: int) -> int: ...
def interrogate_element_length_function(element: int) -> int: ...
def interrogate_element_is_sequence(element: int) -> bool: ...
def interrogate_element_is_mapping(element: int) -> bool: ...

# Global Data
def interrogate_number_of_globals() -> int: ...
def interrogate_get_global(n: int) -> int: ...

# Functions
def interrogate_number_of_global_functions() -> int: ...
def interrogate_get_global_function(n: int) -> int: ...
def interrogate_number_of_functions() -> int: ...
def interrogate_get_function(n: int) -> int: ...
def interrogate_function_name(function: int) -> str: ...
def interrogate_function_scoped_name(function: int) -> str: ...
def interrogate_function_has_comment(function: int) -> bool: ...
def interrogate_function_comment(function: int) -> str: ...
def interrogate_function_prototype(function: int) -> str: ...
def interrogate_function_is_method(function: int) -> bool: ...
def interrogate_function_class(function: int) -> int: ...
def interrogate_function_is_unary_op(function: int) -> bool: ...
def interrogate_function_is_operator_typecast(function: int) -> bool: ...
def interrogate_function_is_constructor(function: int) -> bool: ...
def interrogate_function_is_destructor(function: int) -> bool: ...
def interrogate_function_has_module_name(function: int) -> bool: ...
def interrogate_function_module_name(function: int) -> str: ...
def interrogate_function_has_library_name(function: int) -> bool: ...
def interrogate_function_library_name(function: int) -> str: ...
def interrogate_function_is_virtual(function: int) -> bool: ...
def interrogate_function_number_of_c_wrappers(function: int) -> int: ...
def interrogate_function_c_wrapper(function: int, n: int) -> int: ...
def interrogate_function_number_of_python_wrappers(function: int) -> int: ...
def interrogate_function_python_wrapper(function: int, n: int) -> int: ...

# Function Wrappers
def interrogate_wrapper_name(wrapper: int) -> str: ...
def interrogate_wrapper_function(wrapper: int) -> int: ...
def interrogate_wrapper_is_callable_by_name(wrapper: int) -> bool: ...
def interrogate_wrapper_is_copy_constructor(wrapper: int) -> bool: ...
def interrogate_wrapper_is_coerce_constructor(wrapper: int) -> bool: ...
def interrogate_wrapper_is_extension(wrapper: int) -> bool: ...
def interrogate_wrapper_is_deprecated(wrapper: int) -> bool: ...
def interrogate_wrapper_has_comment(wrapper: int) -> bool: ...
def interrogate_wrapper_comment(wrapper: int) -> str: ...
def interrogate_wrapper_has_return_value(wrapper: int) -> bool: ...
def interrogate_wrapper_return_type(wrapper: int) -> int: ...
def interrogate_wrapper_caller_manages_return_value(wrapper: int) -> bool: ...
def interrogate_wrapper_return_value_destructor(wrapper: int) -> int: ...
def interrogate_wrapper_number_of_parameters(wrapper: int) -> int: ...
def interrogate_wrapper_parameter_type(wrapper: int, n: int) -> int: ...
def interrogate_wrapper_parameter_has_name(wrapper: int, n: int) -> bool: ...
def interrogate_wrapper_parameter_name(wrapper: int, n: int) -> str: ...
def interrogate_wrapper_parameter_is_this(wrapper: int, n: int) -> bool: ...
def interrogate_wrapper_parameter_is_optional(wrapper: int, n: int) -> bool: ...
def interrogate_wrapper_has_pointer(wrapper: int) -> bool: ...
def interrogate_wrapper_pointer(wrapper: int) -> None: ...
def interrogate_wrapper_unique_name(wrapper: int) -> str: ...
def interrogate_get_wrapper_by_unique_name(unique_name: str) -> int: ...

# MakeSeqs
def interrogate_make_seq_seq_name(make_seq: int) -> str: ...
def interrogate_make_seq_scoped_name(make_seq: int) -> str: ...
def interrogate_make_seq_has_comment(make_seq: int) -> bool: ...
def interrogate_make_seq_comment(make_seq: int) -> str: ...
def interrogate_make_seq_num_name(make_seq: int) -> str: ...
def interrogate_make_seq_element_name(make_seq: int) -> str: ...
def interrogate_make_seq_num_getter(make_seq: int) -> int: ...
def interrogate_make_seq_element_getter(make_seq: int) -> int: ...

# Types
def interrogate_number_of_global_types() -> int: ...
def interrogate_get_global_type(n: int) -> int: ...
def interrogate_number_of_types() -> int: ...
def interrogate_get_type(n: int) -> int: ...
def interrogate_get_type_by_name(type_name: str) -> int: ...
def interrogate_get_type_by_scoped_name(type_name: str) -> int: ...
def interrogate_get_type_by_true_name(type_name: str) -> int: ...
def interrogate_type_is_global(type: int) -> bool: ...
def interrogate_type_is_deprecated(type: int) -> bool: ...
def interrogate_type_name(type: int) -> str: ...
def interrogate_type_scoped_name(type: int) -> str: ...
def interrogate_type_true_name(type: int) -> str: ...
def interrogate_type_is_nested(type: int) -> bool: ...
def interrogate_type_outer_class(type: int) -> int: ...
def interrogate_type_has_comment(type: int) -> bool: ...
def interrogate_type_comment(type: int) -> str: ...
def interrogate_type_has_module_name(type: int) -> bool: ...
def interrogate_type_module_name(type: int) -> str: ...
def interrogate_type_has_library_name(type: int) -> bool: ...
def interrogate_type_library_name(type: int) -> str: ...
def interrogate_type_is_atomic(type: int) -> bool: ...
def interrogate_type_atomic_token(type: int) -> int: ...
def interrogate_type_is_unsigned(type: int) -> bool: ...
def interrogate_type_is_signed(type: int) -> bool: ...
def interrogate_type_is_long(type: int) -> bool: ...
def interrogate_type_is_longlong(type: int) -> bool: ...
def interrogate_type_is_short(type: int) -> bool: ...
def interrogate_type_is_wrapped(type: int) -> bool: ...
def interrogate_type_is_pointer(type: int) -> bool: ...
def interrogate_type_is_const(type: int) -> bool: ...
def interrogate_type_is_typedef(type: int) -> bool: ...
def interrogate_type_wrapped_type(type: int) -> int: ...
def interrogate_type_is_array(type: int) -> bool: ...
def interrogate_type_array_size(type: int) -> int: ...
def interrogate_type_is_enum(type: int) -> bool: ...
def interrogate_type_is_scoped_enum(type: int) -> bool: ...
def interrogate_type_number_of_enum_values(type: int) -> int: ...
def interrogate_type_enum_value_name(type: int, n: int) -> str: ...
def interrogate_type_enum_value_scoped_name(type: int, n: int) -> str: ...
def interrogate_type_enum_value_comment(type: int, n: int) -> str: ...
def interrogate_type_enum_value(type: int, n: int) -> int: ...
def interrogate_type_is_struct(type: int) -> bool: ...
def interrogate_type_is_class(type: int) -> bool: ...
def interrogate_type_is_union(type: int) -> bool: ...
def interrogate_type_is_fully_defined(type: int) -> bool: ...
def interrogate_type_is_unpublished(type: int) -> bool: ...
def interrogate_type_number_of_constructors(type: int) -> int: ...
def interrogate_type_get_constructor(type: int, n: int) -> int: ...
def interrogate_type_has_destructor(type: int) -> bool: ...
def interrogate_type_destructor_is_inherited(type: int) -> bool: ...
def interrogate_type_get_destructor(type: int) -> int: ...
def interrogate_type_number_of_elements(type: int) -> int: ...
def interrogate_type_get_element(type: int, n: int) -> int: ...
def interrogate_type_number_of_methods(type: int) -> int: ...
def interrogate_type_get_method(type: int, n: int) -> int: ...
def interrogate_type_number_of_make_seqs(type: int) -> int: ...
def interrogate_type_get_make_seq(type: int, n: int) -> int: ...
def interrogate_type_number_of_casts(type: int) -> int: ...
def interrogate_type_get_cast(type: int, n: int) -> int: ...
def interrogate_type_number_of_derivations(type: int) -> int: ...
def interrogate_type_get_derivation(type: int, n: int) -> int: ...
def interrogate_type_is_final(type: int) -> bool: ...
def interrogate_type_derivation_has_upcast(type: int, n: int) -> bool: ...
def interrogate_type_get_upcast(type: int, n: int) -> int: ...
def interrogate_type_derivation_downcast_is_impossible(type: int, n: int) -> bool: ...
def interrogate_type_derivation_has_downcast(type: int, n: int) -> bool: ...
def interrogate_type_get_downcast(type: int, n: int) -> int: ...
def interrogate_type_number_of_nested_types(type: int) -> int: ...
def interrogate_type_get_nested_type(type: int, n: int) -> int: ...