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
Hi,
I submit this issue in VScode, turn out it should be here.
You can see the discussion: microsoft/vscode-python#11213
Just as the topic said, I have tried lots of methods online, but None is effective.
One suggests add the code in pylint,''generated-members=numpy.,torch.''
Yes, it works for some code(some still have a red line), but other errors can't be marked it out either because of adding the code.
It troubled me a lot, I like VScode, but this is really annoying problem.
The text was updated successfully, but these errors were encountered:
Thanks. It absolutely works. But it also can cause some other problems.
For example, some typo errors will not be pointed it out because of this no-member.
The best solution still needs pylint support Pytorch or torch I assume.
You can also disable them one by one with # pylint: disable=no-member, if you want to keep the others.
You're right that no-member should not have false positive. It's complicated to fix because the information is contained in C binding. So the fix is probably not going to be quick. Pull request would be welcome as torch is not the only package affected by this :)
Pierre-Sassoulas
changed the title
pylint can't recoginize the torch, always have the red line
False positive for no-member while using torch
May 1, 2020
Hi,
I submit this issue in VScode, turn out it should be here.
You can see the discussion: microsoft/vscode-python#11213
The text was updated successfully, but these errors were encountered: