Skip to content

Commit e5656bc

Browse files
committed
fix: avoid mutable defaults
1 parent c43eb6d commit e5656bc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

asknews_sdk/dto/deepnews.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@ class CreateDeepNewsRequest(BaseSchema):
8686
Optional[Dict[str, Any]],
8787
Field(None, title="Any filter param available on the /news endpoint."),
8888
]
89-
sources: Annotated[Optional[List[str]], Field(["asknews"], title="Sources")]
89+
sources: Annotated[
90+
Optional[
91+
Union[
92+
Literal["asknews", "google"],
93+
List[Literal["asknews", "google"]],
94+
]
95+
],
96+
Field("asknews", title="Sources"),
97+
]
9098
search_depth: Annotated[Optional[int], Field(2, title="Search Depth")]
9199
max_depth: Annotated[Optional[int], Field(4, title="Max Depth")]
92100
return_sources: Annotated[

0 commit comments

Comments
 (0)