Svyatoslav <prometheus3...@gmail.com> added the comment:
> This is because get_type_hints looks only at mro of the class. Its namespace must be included too as locals < I'll correct myself. get_type_hints() looks at all entites of mro of a class. If globals are not defined, globals of an entity module are used. But if locals are not defined, then no action is taken. Actually, class namespace must be used as locals in that case. This is also supported by the case when a class and its module have classes with the same name. See same_classes.py for an example. ---------- Added file: https://bugs.python.org/file49720/same_classes.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42829> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com