Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: ravi-kumar-pilla <[email protected]>
  • Loading branch information
ravi-kumar-pilla committed May 17, 2024
1 parent ffdce46 commit e465101
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package/kedro_viz/api/rest/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ class DeployerConfiguration(BaseModel):
"""Credentials for Deployers."""

platform: str
is_preview_enabled: bool
is_datasets_previewed: bool
endpoint: str
bucket_name: str
2 changes: 1 addition & 1 deletion package/kedro_viz/api/rest/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,4 @@ def save_api_responses_to_fs(path: str, remote_fs: Any, is_datasets_previewed: b
logger.exception(
"An error occurred while preparing data for saving. Error: %s", str(exc)
)
raise exc
raise exc
2 changes: 1 addition & 1 deletion package/kedro_viz/api/rest/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def deploy_kedro_viz(input_values: DeployerConfiguration):
deployer = DeployerFactory.create_deployer(
input_values.platform, input_values.endpoint, input_values.bucket_name
)
deployer.deploy(input_values.is_preview_enabled)
deployer.deploy(input_values.is_datasets_previewed)
response = {
"message": "Website deployed on "
f"{input_values.platform and input_values.platform.upper()}",
Expand Down
9 changes: 5 additions & 4 deletions package/kedro_viz/models/flowchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,11 @@ def set_preview(cls, _):
@field_validator("preview_type")
@classmethod
def set_preview_type(cls, _):
if not cls._is_preview_enabled:
return None

if cls.data_node.is_preview_disabled() or not hasattr(cls.dataset, "preview"):
if (
cls.data_node.is_preview_disabled()
or not hasattr(cls.dataset, "preview")
or not cls.is_datasets_previewed
):
return None

try:
Expand Down

0 comments on commit e465101

Please sign in to comment.