Skip to content

Commit 1d1de50

Browse files
fix
1 parent 2288ee5 commit 1d1de50

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

python_sdk/mypy.ini

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
[mypy]
2-
exclude = (build|openapi_generated\.py)
2+
exclude = build
33

44
[mypy-src.api.openapi_generated]
5-
follow_imports = skip
6-
7-
[mypy-vizql_data_service_py.api.openapi_generated]
8-
follow_imports = skip
5+
ignore_errors = True

python_sdk/scripts/post_process.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ def convert_file(input_file, output_file):
1515
for old, new in replacementsRegex.items():
1616
content = re.sub(old, new, content)
1717

18+
# Fix multi-line Annotated in SseResultStream (Python 3.13 Linux parser issue)
19+
content = content.replace(
20+
"class SseResultStream(RootModel[Union[SseMetadataEvent, SseDataEvent, SseErrorEvent]]):\n"
21+
" root: Annotated[\n"
22+
" Union[SseMetadataEvent, SseDataEvent, SseErrorEvent],\n"
23+
" PydanticField(discriminator='event'),\n"
24+
" ]",
25+
"class SseResultStream(RootModel[Union[SseMetadataEvent, SseDataEvent, SseErrorEvent]]):\n"
26+
" root: Annotated[Union[SseMetadataEvent, SseDataEvent, SseErrorEvent], PydanticField(discriminator='event')]"
27+
)
28+
1829
# Non-regex replacements
1930
replacements = {
2031
"FieldModel": "Field",

0 commit comments

Comments
 (0)