This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jarryshaw
Recipients gousaiyang, gvanrossum, jarryshaw, kj, levkivskyi
Date 2021-09-14.20:47:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631652446.56.0.561966739029.issue43893@roundup.psfhosted.org>
In-reply-to
Content
Apparently static checkers like mypy doesn't rely on the `typing.get_type_hints` function to implement its type checking functions (as I had browsed through the code repo).

$ cat test.py
def foo(arg) -> ' str': ...
$ mypy test.py
Success: no issues found in 1 source file

If type checkers *think* this is acceptable, but the standard library doesn't, this can be some sort of inconsistency in my perspective.

As Saiyang Gou had suggested, I would rather prefer to change the behaviour of `compile` in `eval` mode to preserve the internal consistency of builtin functions and therefore to eliminate this *buggy* behaviour of `typing.get_type_hints`.
History
Date User Action Args
2021-09-14 20:47:26jarryshawsetrecipients: + jarryshaw, gvanrossum, levkivskyi, gousaiyang, kj
2021-09-14 20:47:26jarryshawsetmessageid: <1631652446.56.0.561966739029.issue43893@roundup.psfhosted.org>
2021-09-14 20:47:26jarryshawlinkissue43893 messages
2021-09-14 20:47:26jarryshawcreate