Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/attr/_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ def _is_class_var(annot):
annotations which would put attrs-based classes at a performance
disadvantage compared to plain old classes.
"""
annot = str(annot)
# Python 3.14+ wraps deferred annotations in ForwardRef.
# Extract the inner string to get the actual annotation text.
if hasattr(annot, "__forward_arg__"):
annot = annot.__forward_arg__
else:
annot = str(annot)

# Annotation can be quoted.
if annot.startswith(("'", '"')) and annot.endswith(("'", '"')):
Expand Down