When using VS Code and flake8, line width of python code is by default limited to 79 characters.
For people like me, 79 characters are not enough. How can we increase it?
-
VSC Setting
python.linting.flake8Args- add item
--max-line-length=80
- add item
-
Update VS Code configuration file :
{
"python.linting.flake8Args": [
"--max-line-length=80"
]
}
It is very important to install Flake8 on the correct version of Python for your needs. If you want Flake8 to properly parse new language features in Python 3.5 (for example), you need it to be installed on 3.5 for Flake8 to understand those features. In many ways, Flake8 is tied to the version of Python on which it runs.
python -m pip install flake8vim-flake8 is a Vim plugin that runs the currently open file through Flake8, a static syntax and style checker for Python source code. It supersedes both vim-pyflakes and vim-pep8.
Flake8 is a wrapper around PyFlakes (static syntax checker), PEP8 (style checker) and Ned's MacCabe script (complexity checker).
After starting your first Python project, you might realize that it is actually not that obvious to be consistent with the way you write Python code. If you collaborate with other developers, your code style might differ, and the code can become somehow unreadable.