Skip to main content

inspectors

ModuleSource

The functionalities related to inspecting and analyzing objects.

Functions

Member
Description
get_mroGet the mro of a class.
get_obj_slangGet the full slang of a function/class/variable in a module.
is_user_defined_methodCheck whether a member is defined in a class.
get_members_defined_in_classGet all members (attributes) defined in a class.
get_members_defined_in_enumGet all members (attributes) defined in an enum class.
get_field_docstringsCapture the docstrings of each assignment item in a class by its source code.
get_arg_default_nameFormat the given value as a string that can be used as the default field of a function argument (DocFunction).
get_lambda_sourceGet the source definition of a lambda function expression.
get_func_signatureAttempt to get the signature of a potential function.
get_field_defaultFormat the given value as a string that can be used as the default field of a field (DocField).
is_multival_tupleCheck whether the given annotation is a multi-variable tuple such as.
is_member_abstractCheck whether a value is an abstract member of a class.
is_func_yieldCheck whether the given object is a function returning an iterator.
unwrap_annotated_annotationGiven an annotation, remove the Annotated[...] wrapper recursively if it appears.
unpack_annotationUnpack the annotation wrapper.
strip_annotation_nameConvert an annotation to string, and strip its name by removing the module prefix.
get_short_descrGet the short description from the long description.
get_slugGet the URL slug from the slang prototype.
relative_url_pathSolve the relative path.