[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

Gregory Beauregard report at bugs.python.org
Thu Jan 27 21:01:54 EST 2022


Gregory Beauregard <greg at greg.red> added the comment:

I think I miscommunicated my intent with sentence placement. I already posted the thoughts I referred to; they're just my concluding opinion on the technical merit of using get_type_hints in dataclasses to solve the Annotated problem: https://bugs.python.org/msg411945

In any case, I apologize for the faux pas and I'll be careful in the future.

I dug up the issue where pyright was changed (to allow bare ClassVar) that has an argument for not allowing it to be bare: https://github.com/microsoft/pyright/issues/2377

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46553>
_______________________________________


More information about the Python-bugs-list mailing list