python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 14 forks source link

Support running without the mypy plugin #3

Closed oremanj closed 5 years ago

oremanj commented 5 years ago

Calls to @takes_callable_and_args functions won't have the args type-checked without the plugin, but that's better than unconditionally failing. In order to be more non-plugin-friendly, replace the trio_typing.ArgsForCallable marker type with mypy_extensions.VarArg(). Add tests for reasonable behavior when the plugin is absent.