-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Python 3.14.0b2 (tags/v3.14.0b2:12d3f88, May 26 2025, 13:55:44) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... x: int
...
>>> A.__annotate__('x')
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
A.__annotate__('x')
~~~~~~~~~~~~~~^^^^^
File "<python-input-0>", line 1, in __annotate__
class A:
TypeError: '>' not supported between instances of 'str' and 'int'
>>>
The message should be something like
TypeError: __annotate__() argument must be int, not str
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error