2 ms·
If you use PyCharm, you can use cmd-alt-L to autoformat a file (and also reorder/fix imports). By default, I believe it just uses the pep8 standard, which I fin
by msluyter 7y ago
If you use PyCharm, you can use cmd-alt-L to autoformat a file (and also reorder/fix imports). By default, I believe it just uses the pep8 standard, which I find generally sufficient, but you can evidently integrate Black via:
https://black.readthedocs.io/en/stable/editor_integration.html https://black.readthedocs.io/en/stable/editor_integration.ht...
- schemathings 7y agoFWIW gg=G formats in vim (whole doc), with lots of variations available .. more examples: https://stackoverflow.com/questions/506075/how-do-i-fix-the-indentation-of-an-entire-file-in-vi https://stackoverflow.com/questions/506075/how-do-i-fix-the-...