Skip to content

Commit

Permalink
fix super call in list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
r04922101 committed Jan 26, 2024
1 parent 233be7a commit 2a575ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/flask/cli.py
Expand Up @@ -858,7 +858,9 @@ def convert(
self, value: t.Any, param: click.Parameter | None, ctx: click.Context | None
) -> t.Any:
items = self.split_envvar_value(value)
return [super().convert(item, param, ctx) for item in items]
return [
super(SeparatedPathType, self).convert(item, param, ctx) for item in items
]


@click.command("run", short_help="Run a development server.")
Expand All @@ -880,14 +882,18 @@ def convert(
@click.option(
"--reload/--no-reload",
default=None,
help="Enable or disable the reloader. By default the reloader "
"is active if debug is enabled.",
help=(
"Enable or disable the reloader. By default the reloader "
"is active if debug is enabled."
),
)
@click.option(
"--debugger/--no-debugger",
default=None,
help="Enable or disable the debugger. By default the debugger "
"is active if debug is enabled.",
help=(
"Enable or disable the debugger. By default the debugger "
"is active if debug is enabled."
),
)
@click.option(
"--with-threads/--without-threads",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_cli.py
Expand Up @@ -679,3 +679,8 @@ def test_cli_empty(app):

result = app.test_cli_runner().invoke(args=["blue", "--help"])
assert result.exit_code == 2, f"Unexpected success:\n\n{result.output}"


def test_run_exclude_patterns():
ctx = run_command.make_context("run", ["--exclude-patterns", __file__])
assert ctx.params["exclude_patterns"] == [__file__]

0 comments on commit 2a575ec

Please sign in to comment.