Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): cleanup unused flake8 noqa statements #5492

Merged
merged 2 commits into from
Jul 27, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from unittest.mock import patch

# This import verifies that the dependencies are available.
import cx_Oracle # noqa: F401
import cx_Oracle
import pydantic
from pydantic.fields import Field
from sqlalchemy import event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# These imports verify that the dependencies are available.
import psycopg2 # noqa: F401
import pydantic # noqa: F401
import pydantic
import sqlalchemy
import sqlalchemy_redshift # noqa: F401
from pydantic.fields import Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ def _get_domain_wu(
entity_urn: str,
entity_type: str,
sql_config: SQLAlchemyConfig,
) -> Iterable[Union[MetadataWorkUnit]]:
) -> Iterable[MetadataWorkUnit]:

domain_urn = self._gen_domain_urn(dataset_name)
if domain_urn:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.sql import sqltypes
from sqlalchemy.sql.type_api import TypeEngine
from trino.exceptions import TrinoQueryError # noqa
from trino.exceptions import TrinoQueryError
from trino.sqlalchemy import datatype, error
from trino.sqlalchemy.dialect import TrinoDialect

Expand Down
6 changes: 3 additions & 3 deletions metadata-ingestion/src/datahub/telemetry/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def __lt__(self, __other: Any) -> Any:
...


SupportsComparisonT = TypeVar("SupportsComparisonT", bound=SupportsLT) # noqa: Y001
_SupportsComparisonT = TypeVar("_SupportsComparisonT", bound=SupportsLT)


def calculate_percentiles(
data: List[SupportsComparisonT], percentiles: List[int]
) -> Dict[int, SupportsComparisonT]:
data: List[_SupportsComparisonT], percentiles: List[int]
) -> Dict[int, _SupportsComparisonT]:
size = len(data)

if size == 0:
Expand Down
4 changes: 2 additions & 2 deletions metadata-ingestion/tests/integration/lookml/test_lookml.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from datahub.configuration.common import PipelineExecutionError
from datahub.ingestion.run.pipeline import Pipeline
from tests.test_helpers import mce_helpers # noqa: F401
from tests.test_helpers import mce_helpers

logging.getLogger("lkml").setLevel(logging.INFO)

Expand Down Expand Up @@ -229,7 +229,7 @@ def ingestion_test(
tmp_path: pathlib.Path,
mock_time: int,
mock_connection: DBConnection,
) -> None: # noqa : No need for type annotations here
) -> None:
test_resources_dir = pytestconfig.rootpath / "tests/integration/lookml"
mce_out_file = f"lookml_mces_api_{mock_connection.dialect_name}.json"
mocked_client = mock.MagicMock()
Expand Down