I am experimenting with different python formatters and would like to increase the max line length. Ideally without editing the settings.json
file. Is there a way to achieve that?
For all three formatters, the max line length can be increased with additional arguments passed in from settings, i.e.:
--max-line-length=120
--line-length=120
--style={based_on_style: google, column_limit: 120, indent_width: 4}
Hope that helps someone in the future!
@tkazik answered his own question correctly, however, I thought it would be helpful to include some references:
VSCode documentation on using Python formatters:
https://code.visualstudio.com/docs/python/editing#_formatting
autopep8 command line options:
https://pypi.org/project/autopep8/#usage
black command line options:
https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#command-line-options
yapf command line options:
https://github.com/google/yapf#usage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With