pyre-check
pyre-check copied to clipboard
The current class isn't generic with respect to the type variable
I have a bit of code
State = TypeVar("State")
class LoopState(Generic[State], NamedTuple):
blah: int
state: State
which works great. But if I simply reorder:
class LoopState(NamedTuple, Generic[State]):
blah: int
state: State
I get an error:
Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[State]`.
Info:
research 🔥 pipenv run pip freeze | grep pyre
pyre-check==0.0.31
pyre-extensions==0.0.15
@samuela thanks for reporting! @mrkmndz are you familiar with why this might be happening?