Skip to content

Commit deb4287

Browse files
fix mypy issues
1 parent 14fc942 commit deb4287

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redisvl/redis/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ def array_to_buffer(array: List[float], dtype: str) -> bytes:
4444
return np.array(array).astype(dtype.lower()).tobytes()
4545

4646

47-
def buffer_to_array(buffer: bytes, dtype: str) -> List[float]:
48-
"""Convert bytes into into a list of floats."""
47+
def buffer_to_array(buffer: bytes, dtype: str) -> List[Any]:
48+
"""Convert bytes into into a list of numerics."""
4949
try:
5050
VectorDataType(dtype.upper())
5151
except ValueError:
5252
raise ValueError(
5353
f"Invalid data type: {dtype}. Supported types are: {[t.lower() for t in VectorDataType]}"
5454
)
55-
return np.frombuffer(buffer, dtype=dtype.lower()).tolist()
55+
return np.frombuffer(buffer, dtype=dtype.lower()).tolist() # type: ignore[return-value]
5656

5757

5858
def hashify(content: str, extras: Optional[Dict[str, Any]] = None) -> str:

0 commit comments

Comments
 (0)