black: adjust example descriptions for --diff and --check examples (#9211)

* black: modify order and wording on --diff and --check examples

* black: changed the learn more link to point to the project's documentation

* Update pages/common/black.md

Co-authored-by: Axel Navarro <navarroaxel@gmail.com>

Co-authored-by: Axel Navarro <navarroaxel@gmail.com>
This commit is contained in:
Rolv Apneseth 2022-10-30 22:35:40 +00:00 committed by GitHub
parent f63e2da79b
commit 8edccfeca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
# black
> A Python auto code formatter.
> More information: <https://github.com/psf/black>.
> More information: <https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html>.
- Auto-format a file or entire directory:
@ -11,15 +11,15 @@
`black -c "{{code}}"`
- Output the changes that would be applied for each file:
`black --diff {{path/to/file_or_directory}}`
- Perform a dry run (print what would be done without actually doing it):
- Output whether a file or a directory would have changes made to them if they were to be formatted:
`black --check {{path/to/file_or_directory}}`
- Auto-format a file or directory emitting exclusively error messages to stderr:
- Output changes that would be made to a file or a directory without performing them (dry-run):
`black --diff {{path/to/file_or_directory}}`
- Auto-format a file or directory, emitting exclusively error messages to stderr:
`black --quiet {{path/to/file_or_directory}}`