Skip to content

Commit b31dcd4

Browse files
committed
Fix type annotations for Python 3.9 compatibility
- Replace 'str | None' with 'Optional[str]' for Python 3.9 compatibility - Fix __eq__ method type annotation from 'other: None' to 'other: object' with return type
1 parent c95c93a commit b31dcd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyobvector/client/fts_index_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
self.field_names = field_names
3131
self.parser_type = parser_type
3232

33-
def param_str(self) -> str | None:
33+
def param_str(self) -> Optional[str]:
3434
"""Convert parser type to string format for SQL."""
3535
if self.parser_type is None:
3636
return None # Default Space parser, no need to specify
@@ -62,7 +62,7 @@ def __iter__(self):
6262
def __str__(self):
6363
return str(dict(self))
6464

65-
def __eq__(self, other: None):
65+
def __eq__(self, other: object) -> bool:
6666
if isinstance(other, self.__class__):
6767
return dict(self) == dict(other)
6868

0 commit comments

Comments
 (0)