1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
API reference
=============
.. module:: typeguard
Type checking
-------------
.. autofunction:: check_type
.. autodecorator:: typechecked
Import hook
-----------
.. autofunction:: install_import_hook
.. autoclass:: TypeguardFinder
:members:
.. autoclass:: ImportHookManager
:members:
Configuration
-------------
.. data:: config
:type: TypeCheckConfiguration
The global configuration object.
Used by :func:`@typechecked <.typechecked>` and :func:`.install_import_hook`, and
notably **not used** by :func:`.check_type`.
.. autoclass:: TypeCheckConfiguration
:members:
.. autoclass:: CollectionCheckStrategy
.. autoclass:: Unset
.. autoclass:: ForwardRefPolicy
.. autofunction:: warn_on_error
Custom checkers
---------------
.. autofunction:: check_type_internal
.. autofunction:: load_plugins
.. data:: checker_lookup_functions
:type: list[Callable[[Any, Tuple[Any, ...], Tuple[Any, ...]], Optional[Callable[[Any, Any, Tuple[Any, ...], TypeCheckMemo], Any]]]]
A list of callables that are used to look up a checker callable for an annotation.
.. autoclass:: TypeCheckMemo
:members:
Type check suppression
----------------------
.. autodecorator:: typeguard_ignore
.. autofunction:: suppress_type_checks
Exceptions and warnings
-----------------------
.. autoexception:: InstrumentationWarning
.. autoexception:: TypeCheckError
.. autoexception:: TypeCheckWarning
.. autoexception:: TypeHintWarning
|