Search code examples
pythonvimsyntasticflake8

Removing entries from syntastic


I'm working on a project that uses gettext and so end up with a lot of error results in syntastic (using flake8) that say:

 undefined name '_'

i don't want to remove W802, but i would like to suppress those messages by grepping out the string before syntastic parses it. I've tried every combination of

let g:syntastic_python_flake8_tail=' | grep -v "F821 undefined name ._."'

i can think of, but i get shell returned 1 or other errors.

How can i set syntastic to remove these errors without removing all F821 errors?


Solution

  • I have found that you can add the following to the [flake8] section of either your global ~/.config/flake8 or project tox.ini, setup.cfg files

    [flake8]
    builtins = _