pip install autopep8 autopep8 your_script.py # dry-run, only print autopep8 -i your_script.py # replace content