Search code examples
pythonvisual-studio-codepylint

VS Code Pylint highlighting the whole function with blue underline on missing function/class docstring


This just suddenly started happening where python pylint will highlight the whole function with blue squiggly lines when for a missing function docstring warning. How can I get it to only highlight the function definition or make a small indicator on the definition line. Its super annoying to get the whole file highlighted when you're developing.

Here's an example of a missing class docstring. The whole file becomes ridiculous to work with.

example of annoying behavior

example of annoying behavior

Desired behaviour is just a small quiggle at the beginning of the line. Thats how it used to be. enter image description here


Solution

  • A solution for this is being actively discussed and developed at the Pylint project. The workarounds until a fix is merged are either to use an earlier version of VS Code (before January 2022) or Pylint (below 2.12.2). If the latter is desired, you can download a local copy and specify a custom path to Pylint in the Python extension settings.