Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e8cc9c5

Browse filesBrowse files
author
Joan Fontanals
authored
fix: create strawberry types with kwargs (#527)
1 parent d615233 commit e8cc9c5
Copy full SHA for e8cc9c5

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎docarray/document/mixins/strawberry.py‎

Copy file name to clipboardExpand all lines: docarray/document/mixins/strawberry.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def to_strawberry_type(self) -> 'StrawberryDocument':
2222
_p_dict[f] = v.to_strawberry_type()
2323
elif f in ('scores', 'evaluations'):
2424
_p_dict[f] = [
25-
_NameScoreItem(k, _NamedScore(**v.to_dict())) for k, v in v.items()
25+
_NameScoreItem(name=k, score=_NamedScore(**v.to_dict()))
26+
for k, v in v.items()
2627
]
2728

2829
else:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.