Question

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?

Was it helpful?

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 = _

OTHER TIPS

You can use g:syntastic_python_flake8_quiet_messages to remove messages:

let g:syntastic_python_flake8_quiet_messages = { "regex": "F821" }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top