Install with pip install --user autopep8
or
conda install -c conda-forge autopep8
.
Preview: autopep8 -d <target_file>.py
or autopep8 -d src/**/*.py
Here -d
means print diff.
Modify: autopep8 -i <target_file>.py
, where -i
means in place.
More help: autopep8 -h