Point72 / csp

csp is a high performance reactive stream processing library, written in C++ and Python
https://github.com/Point72/csp/wiki
Apache License 2.0
150 stars 27 forks source link

csp.const / type resolution fails on empty containers #274

Open robambalu opened 3 weeks ago

robambalu commented 3 weeks ago

Looks like type resolution on empty containers fails with a long and cryptic stack. My guess is its failing because its trying to type the element as well, but there is no element. In this case it should just default to the type itself ( ie list rather than typing.List[T] )

Simple repro:

csp.const([1]) # Good
csp.const([]) # Bad
csp.const(set()) # Bad
csp.const(dict()) # Bad