Skip to content

Commit 686135d

Browse files
committed
style: small refactor in struct_impl.py
1 parent 3811b9b commit 686135d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

libdestruct/common/struct/struct_impl.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ def compute_own_size(cls: type[struct_impl], reference_type: type) -> None:
7474
# Field associated with the annotation
7575
field = getattr(reference_type, name)
7676
attribute = cls._inflater.inflater_for((field, annotation))(None)
77-
size += attribute.size
7877
elif isinstance(annotation, Field):
7978
attribute = cls._inflater.inflater_for((annotation, annotation.base_type))(None)
80-
size += attribute.size
8179
else:
8280
attribute = cls._inflater.inflater_for(annotation)
83-
size += attribute.size
81+
82+
size += attribute.size
8483

8584
cls.size = size
8685

0 commit comments

Comments
 (0)