-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(🎁) get_type_hints
should add the class to the locals
#1820
Comments
At the time the class is being created, A is not bound yet. This is correct behavior and will not change. |
surely you could do something as simple as: from __future__ import annotations
from typing import get_type_hints
class Base:
def __init_subclass__(cls, **kwargs):
get_type_hints(cls, globalns={cls.__name__: cls})
class A(Base):
a: A | None |
You could do that when you call In Python 3.14 you can call |
why should the |
@KotlinIsland I'll note that this isn't trivial. if |
raised here: KotlinIsland/basedtyping#117
The text was updated successfully, but these errors were encountered: