Closed majosm closed 3 years ago
I had to remove a couple of the ContainerT
usage instances to fix mypy failures, so it's maybe a little less useful than I thought. I don't suppose there's a way to indicate that a ContainerT
is also an ArrayOrContainerT
? I think that's (at least partially) what's throwing mypy off.
I wonder if I could do something like:
ArrayT = TypeVar("ArrayT")
ContainerT = TypeVar("ContainerT")
ArrayOrContainerT = Union[ArrayT, ContainerT]
?
That seems to work. Is it OK to add ArrayT
? (Should I put it somewhere other than arraycontext.container
?)
Closes #80.
I noticed a couple of spots where it makes sense (I think) to require containers, so I also added a
ContainerT
in addition toArrayOrContainerT
.