Skip to content

Commit 85bd2e8

Browse files
committed
Fix
1 parent 1536601 commit 85bd2e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cattrs/gen/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,6 @@ def make_dict_structure_fn_from_attrs(
552552
for a in attrs:
553553
an = a.name
554554

555-
if a.default is not NOTHING:
556-
non_required.append(a)
557-
# The next loop will handle it.
558-
continue
559-
560555
if an in kwargs:
561556
override = kwargs[an]
562557
else:
@@ -569,6 +564,11 @@ def make_dict_structure_fn_from_attrs(
569564
if override.omit is None and not a.init and not _cattrs_include_init_false:
570565
continue
571566

567+
if a.default is not NOTHING:
568+
non_required.append(a)
569+
# The next loop will handle it.
570+
continue
571+
572572
t = a.type
573573
if isinstance(t, TypeVar):
574574
t = typevar_map.get(t.__name__, t)

0 commit comments

Comments
 (0)