Reorder command-line options
This commit is contained in:
parent
6fa60ba39d
commit
435aa7ac4a
25
README.md
25
README.md
@ -68,6 +68,15 @@ black [OPTIONS] [SRC]...
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-l, --line-length INTEGER Where to wrap around. [default: 88]
|
-l, --line-length INTEGER Where to wrap around. [default: 88]
|
||||||
|
--py36 Allow using Python 3.6-only syntax on all input
|
||||||
|
files. This will put trailing commas in function
|
||||||
|
signatures and calls also after *args and
|
||||||
|
**kwargs. [default: per-file auto-detection]
|
||||||
|
--pyi Format all input files like typing stubs
|
||||||
|
regardless of file extension (useful when piping
|
||||||
|
source on standard input).
|
||||||
|
-S, --skip-string-normalization
|
||||||
|
Don't normalize string quotes or prefixes.
|
||||||
--check Don't write the files back, just return the
|
--check Don't write the files back, just return the
|
||||||
status. Return code 0 means nothing would
|
status. Return code 0 means nothing would
|
||||||
change. Return code 1 means some files would be
|
change. Return code 1 means some files would be
|
||||||
@ -77,18 +86,6 @@ Options:
|
|||||||
for each file on stdout.
|
for each file on stdout.
|
||||||
--fast / --safe If --fast given, skip temporary sanity checks.
|
--fast / --safe If --fast given, skip temporary sanity checks.
|
||||||
[default: --safe]
|
[default: --safe]
|
||||||
-q, --quiet Don't emit non-error messages to stderr. Errors
|
|
||||||
are still emitted, silence those with
|
|
||||||
2>/dev/null.
|
|
||||||
--pyi Consider all input files typing stubs regardless
|
|
||||||
of file extension (useful when piping source on
|
|
||||||
standard input).
|
|
||||||
--py36 Allow using Python 3.6-only syntax on all input
|
|
||||||
files. This will put trailing commas in function
|
|
||||||
signatures and calls also after *args and
|
|
||||||
**kwargs. [default: per-file auto-detection]
|
|
||||||
-S, --skip-string-normalization
|
|
||||||
Don't normalize string quotes or prefixes.
|
|
||||||
--include TEXT A regular expression that matches files and
|
--include TEXT A regular expression that matches files and
|
||||||
directories that should be included on
|
directories that should be included on
|
||||||
recursive searches. On Windows, use forward
|
recursive searches. On Windows, use forward
|
||||||
@ -99,7 +96,9 @@ Options:
|
|||||||
slashes for directories. [default:
|
slashes for directories. [default:
|
||||||
build/|buck-out/|dist/|_build/|\.git/|\.hg/|
|
build/|buck-out/|dist/|_build/|\.git/|\.hg/|
|
||||||
\.mypy_cache/|\.tox/|\.venv/]
|
\.mypy_cache/|\.tox/|\.venv/]
|
||||||
|
-q, --quiet Don't emit non-error messages to stderr. Errors
|
||||||
|
are still emitted, silence those with
|
||||||
|
2>/dev/null.
|
||||||
--version Show the version and exit.
|
--version Show the version and exit.
|
||||||
--help Show this message and exit.
|
--help Show this message and exit.
|
||||||
```
|
```
|
||||||
|
64
black.py
64
black.py
@ -142,6 +142,29 @@ class FileMode(Flag):
|
|||||||
help="How many character per line to allow.",
|
help="How many character per line to allow.",
|
||||||
show_default=True,
|
show_default=True,
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"--py36",
|
||||||
|
is_flag=True,
|
||||||
|
help=(
|
||||||
|
"Allow using Python 3.6-only syntax on all input files. This will put "
|
||||||
|
"trailing commas in function signatures and calls also after *args and "
|
||||||
|
"**kwargs. [default: per-file auto-detection]"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
@click.option(
|
||||||
|
"--pyi",
|
||||||
|
is_flag=True,
|
||||||
|
help=(
|
||||||
|
"Format all input files like typing stubs regardless of file extension "
|
||||||
|
"(useful when piping source on standard input)."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
@click.option(
|
||||||
|
"-S",
|
||||||
|
"--skip-string-normalization",
|
||||||
|
is_flag=True,
|
||||||
|
help="Don't normalize string quotes or prefixes.",
|
||||||
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--check",
|
"--check",
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
@ -161,38 +184,6 @@ class FileMode(Flag):
|
|||||||
is_flag=True,
|
is_flag=True,
|
||||||
help="If --fast given, skip temporary sanity checks. [default: --safe]",
|
help="If --fast given, skip temporary sanity checks. [default: --safe]",
|
||||||
)
|
)
|
||||||
@click.option(
|
|
||||||
"-q",
|
|
||||||
"--quiet",
|
|
||||||
is_flag=True,
|
|
||||||
help=(
|
|
||||||
"Don't emit non-error messages to stderr. Errors are still emitted, "
|
|
||||||
"silence those with 2>/dev/null."
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@click.option(
|
|
||||||
"--pyi",
|
|
||||||
is_flag=True,
|
|
||||||
help=(
|
|
||||||
"Consider all input files typing stubs regardless of file extension "
|
|
||||||
"(useful when piping source on standard input)."
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@click.option(
|
|
||||||
"--py36",
|
|
||||||
is_flag=True,
|
|
||||||
help=(
|
|
||||||
"Allow using Python 3.6-only syntax on all input files. This will put "
|
|
||||||
"trailing commas in function signatures and calls also after *args and "
|
|
||||||
"**kwargs. [default: per-file auto-detection]"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@click.option(
|
|
||||||
"-S",
|
|
||||||
"--skip-string-normalization",
|
|
||||||
is_flag=True,
|
|
||||||
help="Don't normalize string quotes or prefixes.",
|
|
||||||
)
|
|
||||||
@click.option(
|
@click.option(
|
||||||
"--include",
|
"--include",
|
||||||
type=str,
|
type=str,
|
||||||
@ -215,6 +206,15 @@ class FileMode(Flag):
|
|||||||
),
|
),
|
||||||
show_default=True,
|
show_default=True,
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"-q",
|
||||||
|
"--quiet",
|
||||||
|
is_flag=True,
|
||||||
|
help=(
|
||||||
|
"Don't emit non-error messages to stderr. Errors are still emitted, "
|
||||||
|
"silence those with 2>/dev/null."
|
||||||
|
),
|
||||||
|
)
|
||||||
@click.version_option(version=__version__)
|
@click.version_option(version=__version__)
|
||||||
@click.argument(
|
@click.argument(
|
||||||
"src",
|
"src",
|
||||||
|
Loading…
Reference in New Issue
Block a user