문제

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?

도움이 되었습니까?

해결책

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

다른 팁

You can use g:syntastic_python_flake8_quiet_messages to remove messages:

let g:syntastic_python_flake8_quiet_messages = { "regex": "F821" }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top