One way to clear this up is to get Pylint to white-list Numpy using Visual Studio Code's Settings.
- In Visual Studio Code, select File | Preferences | Settings.
The settings.json file is displayed in the editor. - Click the Workspace Settings tab.
The settings appear in the editor. - In the editor, type in the following and save the file.
{ "python.linting.pylintArgs" : [ "--extension-pkg-whitelist=numpy" ] } - Close and reopen the folder in Visual Studio Code.
The missing member messages and the red wavy underlines no longer appear.
So that any typo or syntax error in numpy cannot be detected by pylint anymore.
ReplyDeleteThis was very helpful to resolve the same issue with pyodbc.connect(), thanks!
ReplyDelete