[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar
Jelle Zijlstra
report at bugs.python.org
Fri Jan 21 22:31:18 EST 2022
Jelle Zijlstra <jelle.zijlstra at gmail.com> added the comment:
I think this should be fixed in typing.py instead. get_type_hints() should be less strict about what it accepts as a type, so users are free to use annotations in innovative ways.
Static type checkers should have the job of enforcing that type annotations are valid types.
----------
nosy: +Jelle Zijlstra
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44799>
_______________________________________
More information about the Python-bugs-list
mailing list