Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
maiarareinaldo committed Feb 20, 2024
1 parent 29794a2 commit 80b62f5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/ingestion/source/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
from datahub.metadata.com.linkedin.pegasus2avro.metadata.snapshot import DatasetSnapshot
from datahub.metadata.com.linkedin.pegasus2avro.mxe import MetadataChangeEvent
from datahub.metadata.schema_classes import (
BrowsePathsClass,
BrowsePathEntryClass,
BrowsePathsClass,
BrowsePathsV2Class,
DataPlatformInstanceClass,
DatasetPropertiesClass,
Expand Down
11 changes: 4 additions & 7 deletions metadata-ingestion/src/datahub/ingestion/source/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,19 +518,16 @@ def __init__(

# if ignore upstream lineage platforms doesn't contain "postgres", then consult the upstream_postgres_database_whitelist
if (
"postgres" not in self.ignore_upstream_lineage_platforms
"postgres" not in self.ignore_upstream_lineage_platforms
and self.config.upstream_postgres_database_whitelist
):
self.upstream_postgres_database_whitelist = [
x.strip()
for x in (
self.config.upstream_postgres_database_whitelist.split(",")
)
for x in (self.config.upstream_postgres_database_whitelist.split(","))
]
else:
# return empty list if the config is not set
self.upstream_postgres_database_whitelist = []


self._authenticate()

Expand Down Expand Up @@ -1386,9 +1383,9 @@ def emit_custom_sql_datasources(self) -> Iterable[MetadataWorkUnit]:
for path in project.strip("/").split("/")
]
)
if datasource.get(tableau_constant.WORKBOOK):
if datasource.get(c.WORKBOOK):
browse_paths_V2_path.append(
BrowsePathEntryClass(id=datasource.get(tableau_constant.WORKBOOK).get(tableau_constant.NAME))
BrowsePathEntryClass(id=datasource.get(c.WORKBOOK).get(c.NAME))
)
browse_paths_V2 = BrowsePathsV2Class(path=browse_paths_V2_path)
dataset_snapshot.aspects.append(browse_paths_V2)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import html
import logging
from dataclasses import dataclass

import re
from dataclasses import dataclass
from functools import lru_cache
from typing import Dict, List, Optional, Tuple

Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/utilities/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import re
import time
from functools import reduce
from typing import Any, Dict, List, Mapping, Match, Optional, Union, cast

from jinja2 import Template
from jinja2.sandbox import SandboxedEnvironment
from typing import Any, Dict, List, Mapping, Match, Optional, Union, cast

from datahub.emitter import mce_builder
from datahub.emitter.mce_builder import OwnerType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"config": {"datahub_api": {"server": GMS_SERVER}},
},
},
"ignore_upstream_lineage_platforms": '',
"upstream_postgres_database_whitelist": 'dvdrental',
"ignore_upstream_lineage_platforms": "",
"upstream_postgres_database_whitelist": "dvdrental",
}


Expand Down Expand Up @@ -522,8 +522,8 @@ def test_tableau_ingest_with_platform_instance(
"config": {"datahub_api": {"server": GMS_SERVER}},
},
},
"ignore_upstream_lineage_platforms": '',
"upstream_postgres_database_whitelist": 'dvdrental',
"ignore_upstream_lineage_platforms": "",
"upstream_postgres_database_whitelist": "dvdrental",
}

tableau_ingest_common(
Expand Down

0 comments on commit 80b62f5

Please sign in to comment.