I just learned about flake8, which calls itself "Flake8: Your Tool For Style Guide Enforcement." While flake8 will find many Python whitespace errors and enforce PEP8, it does not appear to have an option to automatically fix problematic python code.
autopep8 does appear to have this option (called --in-place
), but flake8 seems to have much wider support.
Is there a way to make flake8 fix my code?
flake8
is a linter only -- you'll want a code formatter to do code formatting (such as autopep8 / add-trailing-comma / yapf / black / etc.) – Leelah