Skip to content

Commit

Permalink
fix: linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-salvi-apptware committed Nov 8, 2024
1 parent 267c814 commit dc5c84b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from datahub.ingestion.source.state.stateful_ingestion_base import (
StatefulIngestionSourceBase,
)
from datahub.metadata._schema_classes import DatasetPropertiesClass, TimeStampClass
from datahub.metadata.com.linkedin.pegasus2avro.common import StatusClass
from datahub.metadata.com.linkedin.pegasus2avro.schema import (
SchemaField,
Expand All @@ -52,8 +51,10 @@
from datahub.metadata.schema_classes import (
DataPlatformInstanceClass,
DatasetLineageTypeClass,
DatasetPropertiesClass,
OtherSchemaClass,
SubTypesClass,
TimeStampClass,
UpstreamClass,
UpstreamLineageClass,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
import logging
from typing import Any, Dict, Generator, List, Optional, Type
from typing import Dict, Generator, List, Optional, Type

from datahub.metadata.com.linkedin.pegasus2avro.schema import (
SchemaField,
Expand Down Expand Up @@ -122,7 +122,7 @@ def _get_cur_field_path(self) -> str:
return ".".join(self._prefix_name_stack)

def _get_schema_fields(
self, cassandra_column_infos: List[dict[str, Any]]
self, cassandra_column_infos: List
) -> Generator[SchemaField, None, None]:
# append each schema field (sort so output is consistent)
for column_info in cassandra_column_infos:
Expand Down Expand Up @@ -166,7 +166,7 @@ def _get_schema_fields(

@classmethod
def get_schema_fields(
cls, cassandra_column_infos: List[dict[str, Any]]
cls, cassandra_column_infos: List
) -> Generator[SchemaField, None, None]:
converter = cls()
yield from converter._get_schema_fields(cassandra_column_infos)
2 changes: 1 addition & 1 deletion metadata-ingestion/tests/unit/test_cassandra_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_cassandra_schema_conversion(
schema: str, expected_field_paths: List[str]
) -> None:
schema_dict: Dict[str, List[Any]] = json.loads(schema)
column_infos: List[dict[str, Any]] = schema_dict["column_infos"]
column_infos: List = schema_dict["column_infos"]
actual_fields = list(
CassandraToSchemaFieldConverter.get_schema_fields(column_infos)
)
Expand Down

0 comments on commit dc5c84b

Please sign in to comment.