Skip to content

Commit 06063fb

Browse files
authored
Enforce mypy validation (#713)
Close #619
1 parent 87b6262 commit 06063fb

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ coverage = "pytest -n auto --cov src tests/unit --timeout 10 --cov-report=htm
6666
integration = "pytest -n 10 --cov src tests/integration"
6767
fmt = ["isort .",
6868
"black .",
69-
"ruff . --fix"]
69+
"ruff . --fix",
70+
"mypy ."]
7071
verify = ["black --check .",
7172
"isort . --check-only",
72-
"ruff ."]
73+
"ruff .",
74+
"mypy ."]
7375

7476
[tool.isort]
7577
skip_glob = ["notebooks/*.py"]

src/databricks/labs/ucx/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def run_for_config(
221221
workspace_installer = WorkspaceInstaller(
222222
ws, prefix=prefix, promtps=promtps, wheels=wheels, sql_backend=sql_backend
223223
)
224-
logger.info(f"Installing UCX v{wheels.version()} on {ws.config.host}")
224+
logger.info(f"Installing UCX v{workspace_installer._wheels.version()} on {ws.config.host}")
225225
workspace_installer._config = config
226226
workspace_installer._write_config(overwrite=False)
227227
workspace_installer._current_config.override_clusters = override_clusters

src/databricks/labs/ucx/workspace_access/generic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def _inflight_check(self, object_type: str, object_id: str, acl: list[iam.Access
140140
def _applier_task(self, object_type: str, object_id: str, acl: list[iam.AccessControlRequest]):
141141
retryable_exceptions = [InternalError, NotFound, ResourceConflict, TemporarilyUnavailable, DeadlineExceeded]
142142

143-
update_retry_on_value_error = retried(on=retryable_exceptions, timeout=self._verify_timeout)
143+
update_retry_on_value_error = retried(
144+
on=retryable_exceptions, timeout=self._verify_timeout # type: ignore[arg-type]
145+
)
144146
update_retried_check = update_retry_on_value_error(self._safe_update_permissions)
145147
update_retried_check(object_type, object_id, acl)
146148

src/databricks/labs/ucx/workspace_access/scim.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ def _applier_task(self, group_id: str, value: list[iam.ComplexValue], property_n
118118
operations = [iam.Patch(op=iam.PatchOp.ADD, path=property_name, value=[e.as_dict() for e in value])]
119119
schemas = [iam.PatchSchema.URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP]
120120

121-
patch_retry_on_value_error = retried(on=retryable_errors, timeout=self._verify_timeout)
121+
patch_retry_on_value_error = retried(
122+
on=retryable_errors, timeout=self._verify_timeout # type: ignore[arg-type]
123+
)
122124
patch_retried_check = patch_retry_on_value_error(self._safe_patch_group)
123125
patch_retried_check(group_id, operations, schemas)
124126

0 commit comments

Comments
 (0)