mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
chore(core): use ty for typechecking
Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
@@ -4,6 +4,7 @@ import random
|
||||
import string
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, cast
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -55,7 +56,7 @@ async def test_compute_checksum_error():
|
||||
"""Test checksum error handling."""
|
||||
with pytest.raises(FileError):
|
||||
# Try to hash an object that can't be encoded
|
||||
await compute_checksum(object()) # pyright: ignore [reportArgumentType]
|
||||
await compute_checksum(cast(Any, object()))
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests for parse_tags utility function."""
|
||||
|
||||
from typing import List, Union
|
||||
from typing import Any, List, Union, cast
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -51,7 +51,7 @@ def test_parse_tags_special_case() -> None:
|
||||
def __str__(self) -> str:
|
||||
return "tag1,tag2"
|
||||
|
||||
result = parse_tags(TagObject()) # pyright: ignore [reportArgumentType]
|
||||
result = parse_tags(cast(Any, TagObject()))
|
||||
assert result == ["tag1", "tag2"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user