How Can I Set The Python Max Allowed Line Length To 120 In Syntastic For Vim?
I'm using python-mode for Vim, I prefer for there to be 120 character lines rather than the stark 80 as defined in the PEP8 standard. In python-mode, this is easy. I just add the
Solution 1:
This is now configured globally in ~/.config/flake8
in linux and ~/.flake
in windows. The file can look like this.
[flake8]max-line-length = 120
Have a look at their documentation for per project settings: http://flake8.readthedocs.io/en/latest/user/configuration.html#project-configuration
Solution 2:
You can pass additional arguments to each linter. For pylint, you can use:
let g:syntastic_python_pylint_post_args="--max-line-length=120"
Solution 3:
I would just recommend you disable the length checking by adding this line to your .vimrc dot file:
let g:pymode_lint_ignore = "E501,W"
Solution 4:
There is a file named - defaults.py inside your virtual environment folder - ......./lib/python3.6/site-packages/flake8
You can change the value of max-line-length in that file.
Post a Comment for "How Can I Set The Python Max Allowed Line Length To 120 In Syntastic For Vim?"