# Bug report ### Bug description: The `__qualname__` of `__annotate__` functions of methods of classes incorrectly refers to the `__annotate__` function of the class itself. ```python 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_ <!-- gh-linked-prs --> ### Linked PRs * gh-137842 * gh-148221 <!-- /gh-linked-prs -->
Bug report
Bug description:
The
__qualname__of__annotate__functions of methods of classes incorrectly refers to the__annotate__function of the class itself.Output:
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs
__qualname__of__annotate__#137842