-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
type: bugConcrete, reproducible bugsConcrete, reproducible bugs
Description
Describe the bug
When I try to type annotate a csp graph with "int | None" I get a weird failure
To Reproduce
import csp
@csp.graph
def foo(handle: int | None) -> csp.ts[int]:
return csp.null_ts(int)
foo(5)Expected behavior
To work the same way Union does. This seems to work without pydantic type checking
Error Message
TypeError: Could not create pydantic model for inputs of foo.
can only concatenate str (not "NoneType") to str
Runtime Environment
sys.version = '3.11.11 (main, Dec 9 2024, 15:32:27) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)]' csp.version = '0.0.11'
Metadata
Metadata
Assignees
Labels
type: bugConcrete, reproducible bugsConcrete, reproducible bugs