1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 15:35:24 +02:00
tldr/pages/common/autopep8.md
Gavi Sobell 1f99d907dc
Fixed spelling error (#8051)
From 'in-pace' to 'in-place'
2022-04-25 21:51:44 +05:30

561 B

autopep8

Format Python code according to the PEP 8 style guide. More information: https://github.com/hhatto/autopep8.

  • Format a file to stdout, with a custom maximum line length:

autopep8 {{path/to/file.py}} --max-line-length {{length}}

  • Format a file, displaying a diff of the changes:

autopep8 --diff {{path/to/file}}

  • Format a file in-place and save the changes:

autopep8 --in-place {{path/to/file.py}}

  • Recursively format all files in a directory in-place and save changes:

autopep8 --in-place --recursive {{path/to/directory}}