Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog.d/1636.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved `attrs.astuple()` performance for atomic values nested in sequences by avoiding unnecessary attrs-class detection.
2 changes: 1 addition & 1 deletion src/attr/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def astuple(
tuple_factory=tuple_factory,
retain_collection_types=retain,
)
if has(j.__class__)
if type(j) not in _ATOMIC_TYPES and has(j.__class__)
else j
)
for j in v
Expand Down
Loading