Skip to content

Commit d01a7c9

Browse files
Use Union type to pass make lint check
Use Union type to pass make lint check: tests/integration_tests/vectorstores/test_oraclevs.py:1891: error: X | Y syntax for unions requires Python 3.10 [syntax] tests/integration_tests/vectorstores/test_oraclevs.py:2028: error: X | Y syntax for unions requires Python 3.10 [syntax] Found 2 errors in 1 file (checked 22 source files) make: *** [Makefile:33: lint] Error 1
1 parent af31374 commit d01a7c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/oracledb/tests/integration_tests/vectorstores/test_oraclevs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import logging
1313
import sys
1414
import threading
15+
from typing import Union
1516

1617
import oracledb
1718
import pytest
@@ -1888,7 +1889,7 @@ def test_db_filter_test() -> None:
18881889
for filtered_function in FILTERED_FUNCTIONS:
18891890
method = getattr(vs, filtered_function)
18901891

1891-
query_emb: list[float] | str = query
1892+
query_emb: Union[list[float], str] = query
18921893
if "_by_vector" in filtered_function:
18931894
query_emb = vs.embedding_function.embed_query(query) # type: ignore[union-attr]
18941895

@@ -2025,7 +2026,7 @@ async def test_db_filter_test_async() -> None:
20252026
for filtered_function in FILTERED_FUNCTIONS:
20262027
method = getattr(vs, "a" + filtered_function)
20272028

2028-
query_emb: list[float] | str = query
2029+
query_emb: Union[list[float], str] = query
20292030
if "_by_vector" in filtered_function:
20302031
query_emb = vs.embedding_function.embed_query(query) # type: ignore[union-attr]
20312032

0 commit comments

Comments
 (0)