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
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)
classMyClass(Component, Generic[T]): # in #2416 the unsubscriptable error occurs herepass
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:
classFoo(Component):
passinstance=MyClass[Foo]() # -> Value 'MyClass' is unsubscriptableclassInheritMyClass(MyClass[Foo]): # -> Value 'MyClass' is unsubscriptablepass
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,
The text was updated successfully, but these errors were encountered:
@Foobin and @mostrows2 I wasn't able to reproduce either of bug descriptions with the latest pylint version. We improved the handling of typing.Generic in recent versions, so I would assume that the issues have been fixed already. Going to close this issue.
If you still encounter them, please report back and I'll reopen it.
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
The above has no pylint errors, as expected. However, I am unable to create instances of
MyClass
, or inherit fromMyClass
without an unsubscriptable error popping up in the editor. The code itself runs fine: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,
The text was updated successfully, but these errors were encountered: