Skip to content

Commit dcca323

Browse files
authored
Improve type checking in cli command (#2335)
## Changes Improve type checking in cli command ### Linked issues Would have avoided #2221 ### Functionality None ### Tests None Co-authored-by: Eric Vergnaud <[email protected]>
1 parent 60f60ce commit dcca323

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/databricks/labs/ucx/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from databricks.labs.ucx.contexts.workspace_cli import WorkspaceContext, LocalCheckoutContext
1616
from databricks.labs.ucx.hive_metastore.tables import What
1717
from databricks.labs.ucx.install import AccountInstaller
18+
from databricks.labs.ucx.source_code.linters.files import LocalCodeLinter
1819

1920
ucx = App(__file__)
2021
logger = get_logger(__file__)
@@ -499,7 +500,8 @@ def lint_local_code(
499500
"""Lint local code files looking for problems."""
500501
if ctx is None:
501502
ctx = LocalCheckoutContext(w)
502-
ctx.local_code_linter.lint(prompts, None if path is None else Path(path))
503+
linter: LocalCodeLinter = ctx.local_code_linter
504+
linter.lint(prompts, None if path is None else Path(path))
503505

504506

505507
if __name__ == "__main__":

0 commit comments

Comments
 (0)