Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nkvuong committed May 7, 2024
1 parent 695a2b7 commit d7c74bb
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 46 deletions.
10 changes: 3 additions & 7 deletions tests/unit/aws/test_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
from databricks.sdk import WorkspaceClient
from databricks.sdk.errors import ResourceDoesNotExist
from databricks.sdk.service import iam
from databricks.sdk.service.catalog import (AwsIamRoleResponse,
ExternalLocationInfo,
StorageCredentialInfo)
from databricks.sdk.service.catalog import AwsIamRoleResponse, ExternalLocationInfo, StorageCredentialInfo
from databricks.sdk.service.compute import InstanceProfile, Policy
from databricks.sdk.service.sql import (EndpointConfPair,
GetWorkspaceWarehouseConfigResponse)
from databricks.sdk.service.sql import EndpointConfPair, GetWorkspaceWarehouseConfigResponse

from databricks.labs.ucx.assessment.aws import (AWSPolicyAction, AWSResources,
AWSRole, AWSRoleAction)
from databricks.labs.ucx.assessment.aws import AWSPolicyAction, AWSResources, AWSRole, AWSRoleAction
from databricks.labs.ucx.aws.access import AWSResourcePermissions
from databricks.labs.ucx.aws.credentials import IamRoleCreation
from databricks.labs.ucx.aws.locations import AWSExternalLocationsMigration
Expand Down
46 changes: 29 additions & 17 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,35 @@
from databricks.labs.ucx.aws.access import AWSResourcePermissions
from databricks.labs.ucx.azure.access import AzureResourcePermissions
from databricks.labs.ucx.azure.resources import AzureResources
from databricks.labs.ucx.cli import (alias, assign_metastore, cluster_remap,
create_account_groups,
create_catalogs_schemas,
create_missing_principals,
create_table_mapping,
create_uber_principal,
ensure_assessment_run, installations,
logs, manual_workspace_info,
migrate_credentials, migrate_locations,
migrate_tables, move, open_remote_config,
principal_prefix_access, repair_run,
revert_cluster_remap,
revert_migrated_tables,
show_all_metastores, skip,
sync_workspace_info,
validate_external_locations,
validate_groups_membership, workflows)
from databricks.labs.ucx.cli import (
alias,
assign_metastore,
cluster_remap,
create_account_groups,
create_catalogs_schemas,
create_missing_principals,
create_table_mapping,
create_uber_principal,
ensure_assessment_run,
installations,
logs,
manual_workspace_info,
migrate_credentials,
migrate_locations,
migrate_tables,
move,
open_remote_config,
principal_prefix_access,
repair_run,
revert_cluster_remap,
revert_migrated_tables,
show_all_metastores,
skip,
sync_workspace_info,
validate_external_locations,
validate_groups_membership,
workflows,
)
from databricks.labs.ucx.contexts.account_cli import AccountContext
from databricks.labs.ucx.contexts.workspace_cli import WorkspaceContext
from databricks.labs.ucx.hive_metastore import TablesCrawler
Expand Down
43 changes: 23 additions & 20 deletions tests/unit/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,44 @@

import pytest
import yaml
from databricks.labs.blueprint.installation import (Installation,
MockInstallation)
from databricks.labs.blueprint.installation import Installation, MockInstallation
from databricks.labs.blueprint.installer import InstallState
from databricks.labs.blueprint.parallel import ManyError
from databricks.labs.blueprint.tui import MockPrompts
from databricks.labs.blueprint.wheels import (ProductInfo, WheelsV2,
find_project_root)
from databricks.labs.blueprint.wheels import ProductInfo, WheelsV2, find_project_root
from databricks.labs.lsql.backends import MockBackend
from databricks.sdk import AccountClient, WorkspaceClient
from databricks.sdk.errors import ( # pylint: disable=redefined-builtin
AlreadyExists, InvalidParameterValue, NotFound, NotImplemented,
OperationFailed, PermissionDenied, Unknown)
AlreadyExists,
InvalidParameterValue,
NotFound,
NotImplemented,
OperationFailed,
PermissionDenied,
Unknown,
)
from databricks.sdk.errors.platform import BadRequest
from databricks.sdk.service import iam, jobs, sql
from databricks.sdk.service.compute import (ClusterDetails,
CreatePolicyResponse,
DataSecurityMode, Policy, State)
from databricks.sdk.service.jobs import (BaseRun, RunLifeCycleState,
RunResultState, RunState)
from databricks.sdk.service.compute import ClusterDetails, CreatePolicyResponse, DataSecurityMode, Policy, State
from databricks.sdk.service.jobs import BaseRun, RunLifeCycleState, RunResultState, RunState
from databricks.sdk.service.provisioning import Workspace
from databricks.sdk.service.sql import (Dashboard, DataSource, EndpointInfo,
EndpointInfoWarehouseType, Query,
Visualization, Widget)
from databricks.sdk.service.sql import (
Dashboard,
DataSource,
EndpointInfo,
EndpointInfoWarehouseType,
Query,
Visualization,
Widget,
)
from databricks.sdk.service.workspace import ObjectInfo

import databricks.labs.ucx.installer.mixins
import databricks.labs.ucx.uninstall # noqa
from databricks.labs.ucx.config import WorkspaceConfig
from databricks.labs.ucx.framework.dashboards import DashboardFromFiles
from databricks.labs.ucx.install import (AccountInstaller,
WorkspaceInstallation,
WorkspaceInstaller,
extract_major_minor)
from databricks.labs.ucx.installer.workflows import (DeployedWorkflows,
WorkflowsDeployment)
from databricks.labs.ucx.install import AccountInstaller, WorkspaceInstallation, WorkspaceInstaller, extract_major_minor
from databricks.labs.ucx.installer.workflows import DeployedWorkflows, WorkflowsDeployment
from databricks.labs.ucx.runtime import Workflows

PRODUCT_INFO = ProductInfo.from_class(WorkspaceConfig)
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/workspace_access/test_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from databricks.labs.blueprint.installation import MockInstallation
from databricks.labs.blueprint.tui import MockPrompts
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.compute import (ClusterDetails, ClusterSource,
DataSecurityMode)
from databricks.sdk.service.compute import ClusterDetails, ClusterSource, DataSecurityMode

from databricks.labs.ucx.workspace_access.clusters import ClusterAccess

Expand Down

0 comments on commit d7c74bb

Please sign in to comment.