Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/metrics/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def stat_name_default_handler(
raise InvalidStatsNameException(
f"The stat_name ({stat_name}) has to be less than {max_length} characters."
)
if not all((c in allowed_chars) for c in stat_name):
if any(c not in allowed_chars for c in stat_name):
raise InvalidStatsNameException(
f"The stat name ({stat_name}) has to be composed of ASCII "
f"alphabets, numbers, or the underscore, dot, or dash characters."
Expand Down
2 changes: 1 addition & 1 deletion airflow/utils/setup_teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def push_setup_teardown_task(cls, operator: AbstractOperator | list[AbstractOper
@classmethod
def _push_tasks(cls, operator: AbstractOperator | list[AbstractOperator], setup: bool = False):
if isinstance(operator, list):
if not all(task.is_setup == operator[0].is_setup for task in operator):
if any(task.is_setup != operator[0].is_setup for task in operator):
cls.error("All tasks in the list must be either setup or teardown tasks")
if setup:
cls.push_context_managed_setup_task(operator)
Expand Down