Describe the Bug
from dataclasses import dataclass, field
@dataclass
class F:
idx = field(default=1)
another: int
Traceback (most recent call last):
File "<python-input-0>", line 3, in <module>
@dataclass
^^^^^^^^^
File "/usr/lib/python3.14/dataclasses.py", line 1442, in dataclass
return wrap(cls)
File "/usr/lib/python3.14/dataclasses.py", line 1432, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
frozen, match_args, kw_only, slots,
weakref_slot)
File "/usr/lib/python3.14/dataclasses.py", line 1090, in _process_class
raise TypeError(f'{name!r} is a field but has no type annotation')
TypeError: 'idx' is a field but has no type annotation
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response