mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Merge pull request #3536 from pre-commit/store-true-default
store_true does not need default=...
This commit is contained in:
commit
b96127c485
1 changed files with 3 additions and 3 deletions
|
|
@ -62,10 +62,10 @@ def _add_hook_type_option(parser: argparse.ArgumentParser) -> None:
|
||||||
|
|
||||||
def _add_run_options(parser: argparse.ArgumentParser) -> None:
|
def _add_run_options(parser: argparse.ArgumentParser) -> None:
|
||||||
parser.add_argument('hook', nargs='?', help='A single hook-id to run')
|
parser.add_argument('hook', nargs='?', help='A single hook-id to run')
|
||||||
parser.add_argument('--verbose', '-v', action='store_true', default=False)
|
parser.add_argument('--verbose', '-v', action='store_true')
|
||||||
mutex_group = parser.add_mutually_exclusive_group(required=False)
|
mutex_group = parser.add_mutually_exclusive_group(required=False)
|
||||||
mutex_group.add_argument(
|
mutex_group.add_argument(
|
||||||
'--all-files', '-a', action='store_true', default=False,
|
'--all-files', '-a', action='store_true',
|
||||||
help='Run on all the files in the repo.',
|
help='Run on all the files in the repo.',
|
||||||
)
|
)
|
||||||
mutex_group.add_argument(
|
mutex_group.add_argument(
|
||||||
|
|
@ -279,7 +279,7 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||||
)
|
)
|
||||||
_add_hook_type_option(install_parser)
|
_add_hook_type_option(install_parser)
|
||||||
install_parser.add_argument(
|
install_parser.add_argument(
|
||||||
'--allow-missing-config', action='store_true', default=False,
|
'--allow-missing-config', action='store_true',
|
||||||
help=(
|
help=(
|
||||||
'Whether to allow a missing `pre-commit` configuration file '
|
'Whether to allow a missing `pre-commit` configuration file '
|
||||||
'or exit with a failure code.'
|
'or exit with a failure code.'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue