Skip to content

Commit 1536601

Browse files
committed
Fix coverage
1 parent cdc534d commit 1536601

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/cattrs/gen/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ def make_dict_structure_fn_from_attrs(
551551
# The first loop deals with required args.
552552
for a in attrs:
553553
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+
554560
if an in kwargs:
555561
override = kwargs[an]
556562
else:
@@ -562,9 +568,7 @@ def make_dict_structure_fn_from_attrs(
562568
continue
563569
if override.omit is None and not a.init and not _cattrs_include_init_false:
564570
continue
565-
if a.default is not NOTHING:
566-
non_required.append(a)
567-
continue
571+
568572
t = a.type
569573
if isinstance(t, TypeVar):
570574
t = typevar_map.get(t.__name__, t)

0 commit comments

Comments
 (0)