Skip to content

Commit 42f578e

Browse files
committed
Fix annotations for older versions of Python
1 parent 0579b8b commit 42f578e

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

singlestoredb/functions/signature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def get_namedtuple_schema(
639639

640640

641641
def get_table_schema(
642-
obj: Table[Any],
642+
obj: Any,
643643
include_default: bool = False,
644644
) -> List[Union[Tuple[Any, str], Tuple[Any, str, Any]]]:
645645
"""

singlestoredb/functions/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ def __new__(cls, *args: T) -> 'Masked[T]':
3737
class Table(Tuple[Unpack[Ts]]):
3838
"""Return type for a table valued function."""
3939

40-
def __new__(cls, *args: Unpack[Ts]) -> 'Table[Tuple[Unpack[Ts]]]':
40+
def __new__(cls, *args: Unpack[Ts]) -> 'Table[Tuple[Unpack[Ts]]]': # type: ignore
4141
return tuple.__new__(cls, args) # type: ignore

singlestoredb/management/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
T = TypeVar('T')
3131

3232
if sys.version_info < (3, 10):
33-
PathLike = Union[str, os.PathLike]
33+
PathLike = Union[str, os.PathLike] # type: ignore
3434
PathLikeABC = os.PathLike
3535
else:
3636
PathLike = Union[str, os.PathLike[str]]

singlestoredb/tests/ext_funcs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# mypy: disable-error-code="type-arg"
23
from typing import Optional
34

45
import numpy as np

singlestoredb/tests/test_udf_returns.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# type ignore[type-arg]
12
# from __future__ import annotations
23
import unittest
34
from typing import Any

0 commit comments

Comments
 (0)