Replies: 1 comment
-
A checker lookup plugin system has been implemented in bf2047a (in the 3.0 branch). Hopefully this will satisfy at least the numpy case. The TorchTyping case needs more customization but this plugin system should lessen their maintenance load too. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As some libraries have developed their own type checking extensions, interest in performing those checks at run-time has risen as well. As of this writing, Typeguard does not have a plugin system that would let those extensions to integrate properly, leading to cases like torchtyping monkey patching Typeguard. This is obviously not ideal so I opened this discussion to get the interested parties involved in the design of an appropriate configuration and plugin systems for Typeguard.
The issues directly relevant to plugins raised on the issue tracker are currently:
numpy.typing.NDArray
#195Issues generally related to customizing Typeguard behavior:
The rough, tentative plan for accommodating the requests is to have a configuration object that contains all the relevant settings for customizing behavior. At startup, Typeguard will load all existing plugins via entry points and give each one a chance to augment the configuration by adding their own hooks.
Beta Was this translation helpful? Give feedback.
All reactions