Helpers for inspecting Python modules.
Class |
|
A simple wrapper for default value of the parameters of overload functions. |
Class |
|
Pseudo typing class for autodoc_type_aliases. |
Class |
|
Pseudo module class for autodoc_type_aliases. |
Class |
|
Pseudo namespace class for autodoc_type_aliases. |
Function | evaluate |
Evaluate unresolved type annotations in a signature object. |
Function | getall |
Get __all__ attribute of the module as dict. |
Function | getannotations |
Get __annotations__ from given *obj* safely. |
Function | getdoc |
Get the docstring for the object. |
Function | getglobals |
Get __globals__ from given *obj* safely. |
Function | getmro |
Get __mro__ from given *obj* safely. |
Function | getorigbases |
Get __orig_bases__ from *obj* safely. |
Function | getslots |
Get __slots__ attribute of the class as dict. |
Function | is |
If attr_name is implemented at builtin class, return True. |
Function | is |
Check if the object is a function or method in cython. |
Function | is |
Check if the object is singledispatch function. |
Function | is |
Check if the object is singledispatch method. |
Function | isabstractmethod |
Check if the object is an abstractmethod. |
Function | isattributedescriptor |
Check if the object is an attribute like descriptor. |
Function | isboundmethod |
Check if the method is a bound method. |
Function | isbuiltin |
Check if the object is builtin. |
Function | isclassmethod |
Check if the object is classmethod. |
Function | iscoroutinefunction |
Check if the object is coroutine-function. |
Function | isdescriptor |
Check if the object is some kind of descriptor. |
Function | isenumattribute |
Check if the object is attribute of enum. |
Function | isenumclass |
Check if the object is subclass of enum. |
Function | isfunction |
Check if the object is function. |
Function | isgenericalias |
Check if the object is GenericAlias. |
Function | is |
Check the if object is a kind of NewType. |
Function | ispartial |
Check if the object is partial. |
Function | isproperty |
Check if the object is property. |
Function | isroutine |
Check is any kind of function or method. |
Function | isstaticmethod |
Check if the object is staticmethod. |
Function | object |
A repr() implementation that returns text safe to use in reST context. |
Function | safe |
A getattr() that turns all exceptions into AttributeErrors. |
Function | signature |
Return a Signature object for the given *subject*. |
Function | signature |
Create a Signature object from AST *node*. |
Function | signature |
Create a Signature object from string. |
Function | stringify |
Stringify a Signature object. |
Function | unpartial |
Get an original object from partial object. |
Function | unwrap |
Get an original object from wrapped object (wrapped functions). |
Function | unwrap |
Get an original object from wrapped object (unwrapping partials, wrapped functions, and other decorators). |
Variable | logger |
Undocumented |
Variable | memory |
Undocumented |
Function | _should |
Check the function should be unwrapped on getting signature. |
Evaluate unresolved type annotations in a signature object.
Parameters | |
sig:inspect.Signature | Undocumented |
globalns:dict|None | Undocumented |
localns:dict|None | Undocumented |
Returns | |
inspect.Signature | Undocumented |
Get the docstring for the object. This tries to obtain the docstring for some kind of objects additionally: * partial functions * inherited docstring * inherited decorated methods
Parameters | |
obj:Any | Undocumented |
attrgetter:Callable | Undocumented |
allowbool | Undocumented |
cls:Any | Undocumented |
name:str|None | Undocumented |
Returns | |
str|None | Undocumented |
If attr_name is implemented at builtin class, return True. >>> is_builtin_class_method(int, '__init__') True Why this function needed? CPython implements int.__init__ by Descriptor but PyPy implements it by pure Python code.
Parameters | |
obj:Any | Undocumented |
attrstr | Undocumented |
Returns | |
bool | Undocumented |
Check if the method is a bound method.
Parameters | |
method:MethodType | Undocumented |
Returns | |
bool | Undocumented |
Return a Signature object for the given *subject*. :param bound_method: Specify *subject* is a bound method or not
Parameters | |
subject:Callable | Undocumented |
boundbool | Undocumented |
typedict | Undocumented |
Returns | |
inspect.Signature | Undocumented |
Create a Signature object from AST *node*.
Parameters | |
node:ast.FunctionDef | Undocumented |
code:str | Undocumented |
Returns | |
inspect.Signature | Undocumented |
Create a Signature object from string.
Parameters | |
signature:str | Undocumented |
Returns | |
inspect.Signature | Undocumented |
Stringify a Signature object. :param show_annotation: If enabled, show annotations on the signature :param show_return_annotation: If enabled, show annotation of the return value :param unqualified_typehints: If enabled, show annotations as unqualified (ex. io.StringIO -> StringIO)
Parameters | |
sig:inspect.Signature | Undocumented |
showbool | Undocumented |
showbool | Undocumented |
unqualifiedbool | Undocumented |
Returns | |
str | Undocumented |