2021-03-13 22:29:43 +01:00
|
|
|
# yapf
|
|
|
|
|
|
|
|
> Python style guide checker.
|
|
|
|
> More information: <https://github.com/google/yapf>.
|
|
|
|
|
|
|
|
- Display a diff of the changes that would be made, without making them (dry-run):
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`yapf {{[-d|--diff]}} {{path/to/file}}`
|
2021-03-13 22:29:43 +01:00
|
|
|
|
|
|
|
- Format the file in-place and display a diff of the changes:
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`yapf {{[-d|--diff]}} {{[-i|--in-place]}} {{path/to/file}}`
|
2021-03-13 22:29:43 +01:00
|
|
|
|
|
|
|
- Recursively format all Python files in a directory, concurrently:
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`yapf {{[-r|--recursive]}} {{[-i|--in-place]}} --style {{pep8}} {{[-p|--parallel]}} {{path/to/directory}}`
|