Skip to content

Commit 6a8e079

Browse files
committed
Merge branch 'main' into feat-alerts
* main: chore(release): Release 0.7.56 fix: Update typing of list
2 parents 29f0d56 + a011719 commit 6a8e079

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.7.56 (2025-01-03)
2+
3+
### Fix
4+
5+
- Update typing of list
6+
17
## 0.7.55 (2024-12-20)
28

39
### Fix

asknews_sdk/dto/chat.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class FilterParamsResponse(BaseModel):
174174
"Treat this like a powerful google query. This is optional.",
175175
] = ("",)
176176
categories: Annotated[
177-
list[
177+
List[
178178
Literal[
179179
"All",
180180
"Business",
@@ -196,7 +196,7 @@ class FilterParamsResponse(BaseModel):
196196
"Categories of news to filter on",
197197
] = (["All"],)
198198
reporting_voice: Annotated[
199-
list[
199+
List[
200200
Literal[
201201
"Objective",
202202
"Subjective",
@@ -233,7 +233,7 @@ class FilterParamsResponse(BaseModel):
233233
"back to look from the current time. Defaults to 24 hours.",
234234
] = (24,)
235235
string_guarantee: Annotated[
236-
list[str] | None,
236+
Optional[List[str]],
237237
"If defined, the search will only occur on articles "
238238
"that contain strings in this list. This is powerful for "
239239
"constraining important names or concepts. It is optional.",
@@ -245,13 +245,13 @@ class FilterParamsResponse(BaseModel):
245245
"be present.",
246246
] = ("AND",)
247247
reverse_string_guarantee: Annotated[
248-
list[str] | None,
248+
Optional[List[str]],
249249
"If defined, the search will only occur on articles "
250250
"that do not contain strings in this list. This is powerful "
251251
"for avoiding articles with a particular name or concept. It is optional.",
252252
] = (None,)
253253
entity_guarantee: Annotated[
254-
list[str] | None,
254+
Optional[List[str]],
255255
"Entities that must be present in the retrieved articles. This is a list of strings, "
256256
"where each string includes entity type and entity value separated by a "
257257
"colon. The first element is the entity type and the second element is "
@@ -265,25 +265,26 @@ class FilterParamsResponse(BaseModel):
265265
"must be present.",
266266
] = ("OR",)
267267
countries: Annotated[
268-
list[str] | None,
268+
Optional[List[str]],
269269
"Article source countries to filter by, this is the two-letter ISO country code"
270270
"For example: United States is 'US', France is 'FR', Sweden is 'SE'.",
271271
] = (None,)
272272
continents: Annotated[
273-
list[
274-
Literal[
275-
"Africa",
276-
"Asia",
277-
"Oceania",
278-
"Europe",
279-
"Middle East",
280-
"North America",
281-
"South America",
273+
Optional[
274+
List[
275+
Literal[
276+
"Africa",
277+
"Asia",
278+
"Oceania",
279+
"Europe",
280+
"Middle East",
281+
"North America",
282+
"South America",
283+
]
282284
]
283-
]
284-
| None,
285+
],
285286
"The articles must be geographically focused on this continent.",
286287
] = (None,)
287288
sentiment: Annotated[
288-
Literal["negative", "neutral", "positive"] | None, "Sentiment to filter articles by."
289+
Optional[Literal["negative", "neutral", "positive"]], "Sentiment to filter articles by."
289290
] = None

asknews_sdk/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Annotated, Callable, Literal, Tuple, Union
1+
from typing import Annotated, Callable, List, Literal, Tuple, Union
22

33
from crontab import CronTab
44
from httpx import Auth, Request
@@ -24,7 +24,7 @@ def __repr__(self):
2424

2525
class ServerSentEvent(BaseModel):
2626
event: str = "message"
27-
data: list = []
27+
data: List = []
2828
id: str = ""
2929
retry: int = 0
3030

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "asknews"
3-
version = "0.7.55"
3+
version = "0.7.56"
44
description = "Python SDK for AskNews"
55
authors = ["Emergent Methods <contact@emergentmethods.ai>"]
66
packages = [{ include = "asknews_sdk" }]

0 commit comments

Comments
 (0)