Typing second-order decorators that may be called with and without arguments
September 17, 2022
Second-order decorators:
- use bound generics to handle types
- use overload types for each invocation to handle decorators that may be called with and without arguments
- https://mypy.readthedocs.io/en/stable/generics.html#decorator-factories
- https://github.com/python/mypy/issues/3360
Exclude coverage checks on overloaded typing stubs: