Skip to content

Commit

Permalink
Merge multiple isintance calls for the same object in a single call (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala authored Aug 26, 2023
1 parent bcb97d0 commit 5a1889a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/utils/dot_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _draw_nodes(
node: DependencyMixin, parent_graph: graphviz.Digraph, states_by_task_id: dict[str, str] | None
) -> None:
"""Draw the node and its children on the given parent_graph recursively."""
if isinstance(node, BaseOperator) or isinstance(node, MappedOperator):
if isinstance(node, (BaseOperator, MappedOperator)):
_draw_task(node, parent_graph, states_by_task_id)
else:
if not isinstance(node, TaskGroup):
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4254,7 +4254,7 @@ def check_dag_edit_acl_for_actions(
dag_ids: set[str] = set()
elif isinstance(items, list):
dag_ids = {item.dag_id for item in items if item is not None}
elif isinstance(items, TaskInstance) or isinstance(items, DagRun):
elif isinstance(items, (TaskInstance, DagRun)):
dag_ids = {items.dag_id}
else:
raise ValueError(
Expand Down

0 comments on commit 5a1889a

Please sign in to comment.