How do I enable auto code formatting for flake8 in PyCharm
The tool you want is probably autopep8. This is especially because the warning codes it uses correspond to the flake8 ones.
For example, if you want to autofix all instances of E701 multiple statements on a single line warning, run the following
for f in `find -name "*.py"`; do autopep8 --in-place --select=E701 $f; done