mirror of https://github.com/CrimsonTome/tldr.git
autopep8: add page (#5645)
parent
80c2d46b46
commit
4a7fab0b97
|
@ -0,0 +1,20 @@
|
||||||
|
# autopep8
|
||||||
|
|
||||||
|
> Formatteer Python-code conform de PEP 8-stijlgids.
|
||||||
|
> Meer informatie: <https://github.com/hhatto/autopep8>.
|
||||||
|
|
||||||
|
- Formateer een bestand naar stdout, met een ingestelde maximale toegestane regellengte:
|
||||||
|
|
||||||
|
`autopep8 {{pad/naar/bestand.py}} --max-line-length {{lengte}}`
|
||||||
|
|
||||||
|
- Formateer een bestand, geef een diff weer met de wijzigingen:
|
||||||
|
|
||||||
|
`autopep8 --diff {{pad/naar/bestand.py}}`
|
||||||
|
|
||||||
|
- Formatteer het bestand en sla de wijzigingen op:
|
||||||
|
|
||||||
|
`autopep8 --in-place {{pad/naar/bestand.py}}`
|
||||||
|
|
||||||
|
- Formatteer de bestanden recursief in een map en sla deze wijzigingen op:
|
||||||
|
|
||||||
|
`autopep8 --in-place --recursive {{pad/naar/map}}`
|
|
@ -0,0 +1,20 @@
|
||||||
|
# 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 maximium 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-pace 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}}`
|
Loading…
Reference in New Issue