match-case class checking against collection.abc.Callable
raises error [misc]
#14014
Labels
collection.abc.Callable
raises error [misc]
#14014
Bug Report
trying to match-case by class
collections.abc.Callable
raiseserror: Expected type in class pattern; found "typing._SpecialForm" [misc]
To Reproduce
https://mypy-play.net/?mypy=master&python=3.10&gist=29d49c837fadc7e404ea295c82d0d28a
Expected Behavior
Given that
collection.abc
classes areisinstance
-checkable, and it works with the others it should work here as well.Your Environment
Tested with 0.981, 0.982 and master branch
https://mypy-play.net/?mypy=master&python=3.10&gist=29d49c837fadc7e404ea295c82d0d28a
The text was updated successfully, but these errors were encountered: