Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Jan 20, 2025
1 parent 44a0d34 commit 947f983
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def __init__(self):

self.task_to_extractor.extractors["AthenaOperator"] = AthenaOperatorExtractor

self.task_to_extractor.extractors[
"BigQueryInsertJobOperator"
] = BigQueryInsertJobOperatorExtractor
self.task_to_extractor.extractors["BigQueryInsertJobOperator"] = (
BigQueryInsertJobOperatorExtractor
)

self._graph: Optional["DataHubGraph"] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def _extract_lineage(
if sql_parsing_result:
if error := sql_parsing_result.debug_info.error:
logger.info(f"SQL parsing error: {error}", exc_info=error)
datajob.properties[
"datahub_sql_parser_error"
] = f"{type(error).__name__}: {error}"
datajob.properties["datahub_sql_parser_error"] = (
f"{type(error).__name__}: {error}"
)
if not sql_parsing_result.debug_info.table_error:
input_urns.extend(sql_parsing_result.in_tables)
output_urns.extend(sql_parsing_result.out_tables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ def get_task_inlets_advanced(task: BaseOperator, context: Any) -> Iterable[Any]:

if task_inlets and isinstance(task_inlets, list):
inlets = []
task_ids = (
{o for o in task_inlets if isinstance(o, str)}
.union(op.task_id for op in task_inlets if isinstance(op, BaseOperator))
.intersection(task.get_flat_relative_ids(upstream=True))
)
task_ids = {o for o in task_inlets if isinstance(o, str)}.union(
op.task_id for op in task_inlets if isinstance(op, BaseOperator)
).intersection(task.get_flat_relative_ids(upstream=True))

from airflow.lineage import AUTO
from cattr import structure
Expand Down

0 comments on commit 947f983

Please sign in to comment.