Skip to content

Commit 44acb37

Browse files
committed
Remove unnecessary list comp
1 parent 1fa4acf commit 44acb37

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/strawberry_sqlalchemy_mapper/mapper.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,7 @@ def resolve_type(self) -> Type[Any]:
132132
def _get_relationship_key(model: object, relationship: RelationshipProperty) -> Tuple[str, ...]:
133133
"""Return relationship key for data loader."""
134134
return tuple(
135-
[
136-
getattr(model, local.key)
137-
for local, _ in relationship.local_remote_pairs or []
138-
if local.key
139-
],
135+
getattr(model, local.key) for local, _ in relationship.local_remote_pairs or [] if local.key
140136
)
141137

142138

0 commit comments

Comments
 (0)