You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typer <path_or_module> utils raises AttributeError: 'NoneType' object has no attribute '__dict__' from dataclasses when using from __future__ import annotations#981
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
The
typer
command crashes withAttributeError: 'NoneType' object has no attribute '__dict__'
under these two conditions:@dataclasses.dataclass
decorator.from __future__ import annotations
.Instant copy-and-paste reproducer for Linux shells:
Stack trace:
Operating System
Linux
Operating System Details
Ubuntu 24.04.1
Typer Version
0.12.5
Python Version
3.12.3
Additional Context
Other issues involving
from __future__ import annotations
that are not duplicates of this issue:Beta Was this translation helpful? Give feedback.
All reactions