File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ dependencies = [
9393path = " .venv"
9494
9595[tool .hatch .envs .default .scripts ]
96- test = " pytest -n 4 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20 --cov-fail-under=90 "
97- coverage = " pytest -n auto --cov src tests/unit --timeout 30 --cov-report=html --durations 20 --cov-fail-under=90 "
96+ test = " pytest -n 4 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20 --cov-fail-under=89 "
97+ coverage = " pytest -n auto --cov src tests/unit --timeout 30 --cov-report=html --durations 20 --cov-fail-under=89 "
9898integration = " pytest -n 10 --cov src tests/integration --durations 20"
9999fmt = [" black . --extend-exclude 'tests/unit/source_code/samples/'" ,
100100 " ruff check . --fix" ,
Original file line number Diff line number Diff line change 2222from databricks .sdk import AccountClient , WorkspaceClient
2323from databricks .sdk .errors import NotFound
2424from databricks .sdk .retries import retried
25- from databricks .sdk .service import iam
25+ from databricks .sdk .service import iam , dashboards
2626from databricks .sdk .service .catalog import FunctionInfo , SchemaInfo , TableInfo
2727from databricks .sdk .service .compute import CreatePolicyResponse
2828from databricks .sdk .service .dashboards import Dashboard as SDKDashboard
@@ -118,10 +118,12 @@ def create(display_name: str = "") -> SDKDashboard:
118118 else :
119119 display_name = f"created_by_ucx_{ make_random ()} _{ watchdog_purge_suffix } "
120120 dashboard = ws .lakeview .create (
121- display_name ,
122- serialized_dashboard = json .dumps (serialized_dashboard ),
123- warehouse_id = warehouse_id ,
124- )
121+ dashboard = dashboards .Dashboard (
122+ display_name = display_name ,
123+ serialized_dashboard = json .dumps (serialized_dashboard ),
124+ warehouse_id = warehouse_id ,
125+ ).as_dict ()
126+ ) # type: ignore
125127 ws .lakeview .publish (dashboard .dashboard_id )
126128 return dashboard
127129
You can’t perform that action at this time.
0 commit comments