skip to Main Content

I get some pylint warnings in the Problems view of PyCharm Community Edition:

enter image description here

a) How can I tell PyCharm to include the corresponding message code/id in the Problems View, so that I am able to manually suppress the warning without manually searching the corresponding message code/id?

b) How can I teach PyCharm to provide a quick fix for suppressing the warning with a line comment?

For example

"PyLint: Too many local variables"

=>

# pylint: disable=too-many-locals

Related:

List of pylint human readable message ids?

How to show pylint message codes in VScode?

How do I automatically fix lint issues reported by pylint?

Visual Studio Code quick-fix & python

Edit

Also see related issue ticket of PyCharm Pylint Plugin:

https://github.com/leinardi/pylint-pycharm/issues/92

3

Answers


  1. Chosen as BEST ANSWER

    While the standard Problems view does not show the message ids, the extra Pylint view does (after running a scan):

    enter image description here

    Unfortunately, quick fixes are not provided by that view.


  2. The answer to

    b) How can I teach PyCharm to provide a quick fix for suppressing the warning with a line comment?

    Is sadly: Go back and wait at https://github.com/leinardi/pylint-pycharm/issues/92 (or someone starts implementing it 😅. and, btw, upstream actually accepts that OR someone goes ahead and creates a yet-another new plugin)

    Login or Signup to reply.
  3. There do not seem be alternative PyLint Plugins for PyCharm. Unfortunately, for VsCodium (Visual Studio Code without tracking) the situation seems to be similar.

    Well, there is the extension ms-python and it supports many linting tools for Python (Strg+Shift+P: Python: Select linter).

    For PyLint it shows the message ids in the VsCodium PROBLEMS view.

    enter image description here

    If the language server would be set to Pylance, Quick fixes for PyLint would be available, too.

    Unfortunately, the language server Pylance does not support VSCodium:

    https://github.com/microsoft/pylance-release/issues/791

    Related:

    Visual Studio Code quick-fix & python

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search