-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-139817: Attribute __qualname__
is added to TypeAliasType
#139919
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
base: main
Are you sure you want to change the base?
gh-139817: Attribute __qualname__
is added to TypeAliasType
#139919
Conversation
__qualname__
is added to TypeAliasType__qualname__
is added to TypeAliasType
CC @sobolevn |
I'm totally not sure that this solution is fully correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I've added some tests on |
PyObject *ta = (PyObject *)typealias_alloc(name, checked_params, NULL, value, | ||
module); | ||
|
||
// It's impossible to determine qualname, so we use name instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could make it a new constructor parameter: X = TypeAliasType("X", int, qualname="foo.X")
. Probably not worth the extra complexity though.
__qualname__
#139817