mypy
ec06e004 - Use TypeVar defaults instead of Any when fixing instance types (PEP 696) (#16812)

Commit
2 years ago
Use TypeVar defaults instead of Any when fixing instance types (PEP 696) (#16812) Start using TypeVar defaults when fixing instance types, instead of filling those with `Any`. This PR preserves the way an invalid amount of args is handled. I.e. filling all with `Any` / defaults, instead of cutting off additional args. Thus preserving full backwards compatibility. This can be easily changed later if necessary. `TypeVarTuple` defaults aren't handled correctly yet. Those will require additional logic which would have complicated the change here and made it more difficult to review. Ref: https://github.com/python/mypy/issues/14851
Author
Parents
Loading