visual studio code pylint only looks at plugins in site packages

The way I’ve found to make pylint read the path of the plugin from Visual Studio Code is

  1. put the following .pylintrc under the project root folder opened from Visual Studio Code

    [MASTER]

    load-plugins=C:/my/project/root/pylintplugins

  2. write the absolute path (*) of the project root folder as shown above

Second Question

Look at the OUTPUT tab of Visual Studio code and select Python from the dropdown list. You will find there how it is calling pylint.

(*) In my case, since I didn’t like the idea of keeping an absolute path, I ended up leveraging the init-hook option to run the following python commands as initialization (the current path is the work-dir and it is added to the sys path where it was missing, there you will find the python plugins file)

[MASTER]
init-hook="import sys; import os; sys.path.append(os.getcwd());"
load-plugins=pylintplugins

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top