Disable auto wrap long line in Visual Studio Code Disable auto wrap long line in Visual Studio Code python python

Disable auto wrap long line in Visual Studio Code


Check your Python formatting provider.

"python.formatting.provider": "autopep8"

I guess in your case it is not Pylint which keeps wrapping the long lines, but autopep8. Try setting --max-line-length for autopep8 instead.

"python.formatting.autopep8Args": [    "--max-line-length=200"]


When using custom arguments, each top-level element of an argument string that's separated by space on the command line must be a separate item in the arguments list. For example:

"python.formatting.autopep8Args": [   "--max-line-length", "120", "--experimental" ],"python.formatting.yapfArgs": [  "--style", "{based_on_style: chromium, indent_width: 20}"],"python.formatting.blackArgs": [  "--line-length", "100"]

For proper formatting of these Python settings you can checkFormatter-specific settings:

Also check the answers here:

Allow statements before imports with Visual Studio Code and autopep8


Autopep8 requires --aggressive in order to recommend non-whitespace changes:

"python.linting.pylintArgs": ["--max-line-length", "120", "--aggressive"]

This will wrap the long lines for you.