Skip to content
Myr

fix super call in list comprehension

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

authored by Tony Huang · committed by David Lord · parent 3435d2f · Browse files · 3 files+10 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

3 files+10 added−1 removed

  • tests:+5 added−0 removed
  • other:+5 added−1 removed

3 files+10 added−1 removed

modified:src/flask/cli.py+3 added-1 removed
856 unmodified lines
857 def convert(858 self, value: t.Any, param: click.Parameter | None, ctx: click.Context | None859 ) -> t.Any:860 items = self.split_envvar_value(value)861 # can't call no-arg super() inside list comprehension until Python 3.12862 super_convert = super().convert861 return [super().convert(item, param, ctx) for item in items]863 return [super_convert(item, param, ctx) for item in items]864865866@click.command("run", short_help="Run a development server.")867@click.option("--host", "-h", default="127.0.0.1", help="The interface to bind to.")
244 unmodified lines
modified:tests/test_cli.py+5 added
677 unmodified lines
678 app.register_blueprint(bp)679680 result = app.test_cli_runner().invoke(args=["blue", "--help"])681 assert result.exit_code == 2, f"Unexpected success:\n\n{result.output}"682683684def test_run_exclude_patterns():685 ctx = run_command.make_context("run", ["--exclude-patterns", __file__])686 assert ctx.params["exclude_patterns"] == [__file__]
modified:CHANGES.rst+2 added
2 unmodified lines
34Unreleased56- Correct type for ``jinja_loader`` property. :issue:`5388`7- Fix error with ``--extra-files`` and ``--exclude-patterns`` CLI options.8 :issue:`5391`91011Version 3.0.112-------------
1541 unmodified lines