fix tests?

This commit is contained in:
Sydney Runkle
2025-04-21 21:14:14 -07:00
parent b6ea73ff24
commit cba7d21732
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ pycryptodome = "^3.21.0"
[tool.ruff]
lint.select = [ "E", "F", "I", "TID251", "UP" ]
lint.ignore = [ "E501" ]
lint.ignore = [ "E501", "UP007" ]
line-length = 88
indent-width = 4
extend-include = ["*.ipynb"]
+2 -2
View File
@@ -34,7 +34,7 @@ def test_last_value() -> None:
def test_topic() -> None:
channel = Topic(str).from_checkpoint(MISSING)
assert channel.ValueType is Sequence[str]
assert channel.ValueType == Sequence[str]
assert channel.UpdateType is Union[str, list[str]]
assert channel.update(["a", "b"])
@@ -58,7 +58,7 @@ def test_topic() -> None:
def test_topic_accumulate() -> None:
channel = Topic(str, accumulate=True).from_checkpoint(MISSING)
assert channel.ValueType is Sequence[str]
assert channel.ValueType == Sequence[str]
assert channel.UpdateType is Union[str, list[str]]
assert channel.update(["a", "b"])
+4 -4
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from typing import Any
from typing import Any, Optional
import pytest
@@ -85,7 +85,7 @@ def test_runnable_callable_injectable_arguments() -> None:
"""
# Test Optional[BaseStore] annotation.
def func_optional_store(inputs: Any, store: BaseStore | None) -> str:
def func_optional_store(inputs: Any, store: Optional[BaseStore]) -> str:
"""Test function that accepts an optional store parameter."""
assert store is None
return "success"
@@ -159,12 +159,12 @@ async def test_runnable_callable_injectable_arguments_async() -> None:
"""
# Test Optional[BaseStore] annotation.
def func_optional_store(inputs: Any, store: BaseStore | None) -> str:
def func_optional_store(inputs: Any, store: Optional[BaseStore]) -> str:
"""Test function that accepts an optional store parameter."""
assert store is None
return "success"
async def afunc_optional_store(inputs: Any, store: BaseStore | None) -> str:
async def afunc_optional_store(inputs: Any, store: Optional[BaseStore]) -> str:
"""Async version of func_optional_store."""
assert store is None
return "success"