-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
This issue is almost identical to #2416. The difference between my issue and #2416 is where the error occurs.
Steps to reproduce
I have the following class
T = TypeVar('T', bound=Component)
class MyClass(Component, Generic[T]): # in #2416 the unsubscriptable error occurs here
pass
The above has no pylint errors, as expected. However, I am unable to create instances of MyClass
, or inherit from MyClass
without an unsubscriptable error popping up in the editor. The code itself runs fine:
class Foo(Component):
pass
instance = MyClass[Foo]() # -> Value 'MyClass' is unsubscriptable
class InheritMyClass(MyClass[Foo]): # -> Value 'MyClass' is unsubscriptable
pass
Current behavior
Value 'MyClass' is unsubscriptable --- pylint(unsubscriptable-object)
pylint --version output
I am using the pylint bundled with the newest version (2020.4.74986 (20 April 2020)) of Microsoft's Python extension for vscode,
syagev and jonasehrlichsyagev