-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The __qualname__
of __annotate__
functions of methods of classes incorrectly refers to the __annotate__
function of the class itself.
class Example:
x: int
def func(self, x: int) -> str: ...
print(f"{Example.__annotate__.__qualname__ = }")
print(f"{Example.func.__annotate__.__qualname__ = }")
Output:
Example.__annotate__.__qualname__ = 'Example.__annotate__'
Example.func.__annotate__.__qualname__ = 'Example.__annotate__'
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error