Skip to content
Myr

Handle help arg by itself the same as no args (#5674)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents 08c480b, da60039 · Browse files · 2 files+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−1 removed

  • other:+5 added−1 removed

2 files+5 added−1 removed

modified:src/flask/cli.py+3 added-1 removed
682 unmodified lines
683684 return super().make_context(info_name, args, parent=parent, **extra)685686 def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]:687 if not args and self.no_args_is_help:687 if (not args and self.no_args_is_help) or (688 len(args) == 1 and args[0] in self.get_help_option_names(ctx)689 ):690 # Attempt to load --env-file and --app early in case they691 # were given as env vars. Otherwise no_args_is_help will not692 # see commands from app.cli.693 _env_file_option.handle_parse_result(ctx, {}, [])
442 unmodified lines
modified:CHANGES.rst+2 added
2 unmodified lines
34Unreleased56- Fix type hint for `cli_runner.invoke`. :issue:`5645`7- ``flask --help`` loads the app and plugins first to make sure all commands8 are shown. :issue:5673`91011Version 3.1.012-------------
1595 unmodified lines