Visual Studio Code is not showing alert for undefined class methods

Viewed 27

I am using vscode with Pylance and Pylint, and it does not show an alert for undefined class methods as Pycharm does.

Example:

Pycharm

Pycharm example

Visual Studio Code

Visual Studio Code example

What I tried:

  • Used a different linter (Flake 8)
  • Made sure there are no settings that might disable that specific linter error
  • Selected the linter (cmd+shift+p > select linter)

Is there's any way to enable this?

1 Answers

It is recommended that you clear all settings and make sure pylint is installed. Then enable linting and select pylint to see if it works.

Adding the following configuration to the setting.json has the same effect:

    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
Related