PyLint integration questions

  • Markus Meyer

    Markus Meyer - 2008-05-27


    first, thanks for PyDev, which is really a nice tool.

    I have some questions regarding PyDev:

    1. How can I ignore multiple warnings on one line? I tried e.g. with "#IGNORE:W0401,W0614" or "#IGNORE:W0401 IGNORE:W0614" but it would not work.

    2. I have "Build Automatically" switched off. When I want to rerun PyLint, I press "Ctrl+S" to save the document, then "Ctrl+B". Often, when I do this, PyLint will not be started. I then switch to another document, then switch to the original document again, change some minor thing and press again "Ctrl+S/Ctrl+B". In most cases, PyLint will then be run. Is this a known problem?

    3. Can I exclude a file from PyLint? I once accidentially run PyLint on an "" file and now my "Problems" list view is filled with lots of (bogus) warnings within this file. Can I remove these warnings somehow?

    Thanks for any pointers!


    • Tim Black

      Tim Black - 2008-05-29

      I can partially answer your third question: To instruct pyLint to ignore a specific file, you use the option passed to pyLint. An easy way to specify pylint options is provided in eclipse: Window->Preferences Pydev+Pylint then at the bottom there is an "Arguments to pass to pylint" text box for your --ignore options. This is only a partial answer, because this will keep pylint from processing the specified files in the future, however, I do not know how to get rid of the existing warnings/errors that are displayed in the "Problems" view...

      I have experienced your problem #2 as well and would love to hear more info on the topic. Where can we learn more about how eclipe and pylint are integrated?


    • Fabio Zadrozny

      Fabio Zadrozny - 2008-05-30

      Number 3 is a PyLint bug. Details at (there's a proposed patch to fix it in the bug comments)

      I think number 2 should actually have a different implementation... maybe something that would force PyLint to be ran only on request (such as a shortcut) may be a better solution in your case (aside from that, please enter a bug report with it so that I can take a look at it).

      Number 1 is also not done... It should be easy to implement (if you're willing to download the pydev source -- there are some instructions at ) it'd be a matter of changing line 303 of org.python.pydev.builder.pylint.PyLintVisitor to consider multiple tokens in the ignore (if you do so, please provide a patch for it... if you don't please report it as a feature request).



    • Steffen Siebert

      Steffen Siebert - 2008-05-30

      About 1: I didn't know about this PyDev feature to disable PyLint warnings.

      What I'm using is the disable-message feature provided by PyLint itself. It supports multiple message types and also works if PyLint is executed standalone.

      The syntax is:

      # pylint: disable-msg=C0103,W0704,W0122



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks