From c21d66a1317a4f6e2e0ad3bb2866b0f3062bbe62 Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Mon, 4 Sep 2023 18:20:42 +0530 Subject: [PATCH] fix lint --- .../ingestion/transformer/extract_ownership_from_tags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/transformer/extract_ownership_from_tags.py b/metadata-ingestion/src/datahub/ingestion/transformer/extract_ownership_from_tags.py index f1a57e88a8fd4..23819a2d14b1d 100644 --- a/metadata-ingestion/src/datahub/ingestion/transformer/extract_ownership_from_tags.py +++ b/metadata-ingestion/src/datahub/ingestion/transformer/extract_ownership_from_tags.py @@ -28,7 +28,7 @@ class ExtractOwnersFromTagsConfig(TransformerSemanticsConfigModel): def get_owner_type(owner_type_str: str) -> Optional[OwnershipTypeClass]: for item in dir(OwnershipTypeClass): if str(item) == owner_type_str: - return item + return getattr(OwnershipTypeClass, item) return OwnershipTypeClass.CUSTOM @@ -46,7 +46,7 @@ def __init__(self, config: ExtractOwnersFromTagsConfig, ctx: PipelineContext): @classmethod def create( cls, config_dict: dict, ctx: PipelineContext - ) -> "ExtractOwnersFromTagsConfig": + ) -> "ExtractOwnersFromTagsTransformer": config = ExtractOwnersFromTagsConfig.parse_obj(config_dict) return cls(config, ctx)