diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/oracle.py b/metadata-ingestion/src/datahub/ingestion/source/sql/oracle.py index 611f2f4b39a40a..e69589a15f3b6c 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/oracle.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/oracle.py @@ -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 diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/redshift.py b/metadata-ingestion/src/datahub/ingestion/source/sql/redshift.py index 51b7a821becc44..c9edeb15559465 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/redshift.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/redshift.py @@ -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 diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py index 3a5d91b101ca07..7cd99608b95af1 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py @@ -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: diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/trino.py b/metadata-ingestion/src/datahub/ingestion/source/sql/trino.py index f11fbeb8356be4..ca174ff22bc3a1 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/trino.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/trino.py @@ -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 diff --git a/metadata-ingestion/src/datahub/telemetry/stats.py b/metadata-ingestion/src/datahub/telemetry/stats.py index e76580d677588c..bf98bd72b574ce 100644 --- a/metadata-ingestion/src/datahub/telemetry/stats.py +++ b/metadata-ingestion/src/datahub/telemetry/stats.py @@ -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: diff --git a/metadata-ingestion/tests/integration/lookml/test_lookml.py b/metadata-ingestion/tests/integration/lookml/test_lookml.py index b9a53614e47780..b4b352d5771b65 100644 --- a/metadata-ingestion/tests/integration/lookml/test_lookml.py +++ b/metadata-ingestion/tests/integration/lookml/test_lookml.py @@ -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) @@ -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()