You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from typing import assert_type
class meta(type):
...
class A(metaclass=meta):
...
reveal_type(A) # type[A]
# The following is ok with Pyrefly.
# Other type checkers: expected "meta" but received "type[A]"
assert_type(A, meta)
However, erroring is more on line with the spec since type[A] is not equivalent to meta
Describe the Bug
Pyrefly is ok with the following:
However, erroring is more on line with the spec since
type[A]is not equivalent tometaSandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN2o4cGHwD6TYjAA66AMZRBcOjRgNUACgkwAlIhl0DdQsZnzFdAILqVas0IC8N1Lv2HjhGZRgA3GKijizDDqFtp0AMSMQQDaFgC6MpEAKgAWMHRguFBQuADurBwQSrgA1nT5DCl0AAqkXmBQpB7okQDylSJRknSyabIlInCIdDD4krIMMJh0UiBOs3TYAK78XrIwEL7Ts1qxCSAGMooiDIGSIQA0yqrOM%2BgyIBcgZPWNhAy0UBSRta%2BkdGgsHh8D1cOhIGwlpRUAwIGDmpEAMowdIpBgMYhDAD0WJeMAaTV4bCxMHQWMwuFkcCxsjBEKhMLhZIyvAE3lQ0FQ2FgoPBEEh0NhYLouGIQvQcGaZEqYIAtL5KHAmXR7DMQABmQgARgATLMZNERNRFQl0Et0FweHwprLMBA1rDfCq6AByfnoXgwF0yD0MWVeACOS3tNoGpFlqFk6yEzpduVQlHQ3vQIAAvk9I46YAAxaAwCiAnAEEjkVNAA
(Only applicable for extension issues) IDE Information
No response