sphinx-autodoc-typehints icon indicating copy to clipboard operation
sphinx-autodoc-typehints copied to clipboard

Problem with resolving MutableMapping with type subscripts

Open anselor opened this issue 2 years ago • 0 comments

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):
    ...

anselor avatar Jun 17 '22 20:06 anselor