We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1536601 commit 85bd2e8Copy full SHA for 85bd2e8
src/cattrs/gen/__init__.py
@@ -552,11 +552,6 @@ def make_dict_structure_fn_from_attrs(
552
for a in attrs:
553
an = a.name
554
555
- if a.default is not NOTHING:
556
- non_required.append(a)
557
- # The next loop will handle it.
558
- continue
559
-
560
if an in kwargs:
561
override = kwargs[an]
562
else:
@@ -569,6 +564,11 @@ def make_dict_structure_fn_from_attrs(
569
564
if override.omit is None and not a.init and not _cattrs_include_init_false:
570
565
continue
571
566
567
+ if a.default is not NOTHING:
568
+ non_required.append(a)
+ # The next loop will handle it.
+ continue
+
572
t = a.type
573
if isinstance(t, TypeVar):
574
t = typevar_map.get(t.__name__, t)
0 commit comments