Skip to content

Commit

Permalink
Add option for multiple sections and options
Browse files Browse the repository at this point in the history
Add newsfragments
  • Loading branch information
sunank200 committed Dec 16, 2024
1 parent a3f6eb2 commit 15fe43b
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 113 deletions.
17 changes: 11 additions & 6 deletions airflow/cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,23 +860,28 @@ def string_lower_type(val):

ARG_LINT_CONFIG_SECTION = Arg(
("--section",),
help="The section name to lint in the airflow config.",
help="The section name(s) to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_OPTION = Arg(
("--option",),
help="The option name to lint in the airflow config.",
help="The option name(s) to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_IGNORE_SECTION = Arg(
("--ignore-section",),
help="The section name to ignore to lint in the airflow config.",
help="The section name(s) to ignore to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_IGNORE_OPTION = Arg(
("--ignore-option",),
help="The option name to ignore to lint in the airflow config.",
help="The option name(s) to ignore to lint in the airflow config.",
type=string_list_type,
)
ARG_OPTIONAL_SECTION = Arg(
("--section",),
help="The section name",
help="The section name(s).",
type=string_list_type,
)

# jobs check
Expand Down Expand Up @@ -1752,7 +1757,7 @@ class GroupCommand(NamedTuple):
),
ActionCommand(
name="lint",
help="lint options for the configuration changes while migrating from airflow 2.x to airflow 3.0",
help="lint options for the configuration changes while migrating from Airflow 2.x to Airflow 3.0",
func=lazy_load_command("airflow.cli.commands.remote_commands.config_command.lint_config"),
args=(
ARG_LINT_CONFIG_SECTION,
Expand Down
Loading

0 comments on commit 15fe43b

Please sign in to comment.