What is a/the way to auto-format an existing (potentially large) Python codebase to conform to a given max line length?
Autoformatters like black, yapf and autopep8 do change too much as they also change other things.
This seems like a thing that can be easily solved using an .editorconfig file. I don't know what IDE/Code editor you use, but from my experience, pyCharm supports it very well. The config should look something like this:
.editorconfig
root = true [*.py] max_line_length = 88
For more info, check https://editorconfig.org/.
Copyright © 2021 Jogjafile Inc.
This seems like a thing that can be easily solved using an
.editorconfigfile. I don't know what IDE/Code editor you use, but from my experience, pyCharm supports it very well. The config should look something like this:For more info, check https://editorconfig.org/.