Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with resolving MutableMapping with type subscripts #239

Open
anselor opened this issue Jun 17, 2022 · 0 comments
Open

Problem with resolving MutableMapping with type subscripts #239

anselor opened this issue Jun 17, 2022 · 0 comments

Comments

@anselor
Copy link

anselor commented Jun 17, 2022

This worked fine is version 1.14.1 and earlier but starting in 1.15.0 I get TypeError: ABCMeta is not subscriptable.

I have code that's something like this:

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    MyBaseType = MutableMapping[str, Any]
else:
    MyBaseType = MutableMapping

class MyCustomClass(MyBaseType):
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants