Pylint Fix (#8134)

* Pylint Fix

* changes as per comment
This commit is contained in:
NiharDoshi99 2022-10-13 18:18:28 +05:30 committed by GitHub
parent 48905a7f6e
commit 7975f0e6fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,17 @@
# Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
DomoDashboard Client source to extract DOMO metadata
"""
from typing import List
from metadata.generated.schema.entity.services.connections.dashboard.domodashboardConnection import (
@ -5,12 +19,21 @@ from metadata.generated.schema.entity.services.connections.dashboard.domodashboa
)
from metadata.ingestion.ometa.client import REST, ClientConfig
CARDS_URL = "cards?includeV4PageLayouts=true&parts=metadata,datasources,library,drillPathURNs,owners,certification,dateInfo,subscriptions,slicers"
CARDS_URL = (
"cards?includeV4PageLayouts=true&parts=metadata,datasources,library,drillPathURNs"
",owners,certification,dateInfo,subscriptions,slicers"
)
HEADERS = {"Content-Type": "application/json"}
class DomoDashboardClient:
"""
Implements the necessary methods to extract
Dashboard metadata from Domo's metadata db
"""
def __init__(self, config: DomoDashboardConnection):
self.config = config
HEADERS.update({"X-DOMO-Developer-Token": self.config.accessToken})
@ -28,5 +51,7 @@ class DomoDashboardClient:
f"{CARDS_URL}"
f"&stackLoadContext=Page&stackLoadContextId={page_id}&stackLoadTrigger=page-view"
)
response = self.client._request(method="GET", path=url, headers=HEADERS)
response = self.client._request( # pylint: disable=protected-access
method="GET", path=url, headers=HEADERS
)
return response