Skip to content

Commit 7608d03

Browse files
committed
fix flake8
1 parent 8f8b6e1 commit 7608d03

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/osw/model/entity.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def cast_none_to_default(self, cls: Type[T]) -> T:
4646
"""Casting self into target class. If the passed attribute is None or solely
4747
includes None values, the attribute is not passed to the instance of the
4848
target class, which will then fall back to the default."""
49+
4950
def test_if_empty_list_or_none(obj) -> bool:
5051
if obj is None:
5152
return True
@@ -56,9 +57,13 @@ def test_if_empty_list_or_none(obj) -> bool:
5657
return True
5758
return False
5859

59-
return cls(**{
60-
k: v for k, v in self.dict().items() if not test_if_empty_list_or_none(v)
61-
})
60+
return cls(
61+
**{
62+
k: v
63+
for k, v in self.dict().items()
64+
if not test_if_empty_list_or_none(v)
65+
}
66+
)
6267

6368

6469
@_basemodel_decorator

0 commit comments

Comments
 (0)