diff --git a/src/databricks/labs/ucx/source_code/files.py b/src/databricks/labs/ucx/source_code/files.py index 568509a8ca..bdd4212d56 100644 --- a/src/databricks/labs/ucx/source_code/files.py +++ b/src/databricks/labs/ucx/source_code/files.py @@ -3,8 +3,6 @@ import ast import logging from pathlib import Path -from collections.abc import Callable -from collections.abc import Iterable from databricks.labs.ucx.source_code.path_lookup import PathLookup from databricks.sdk.service.workspace import Language diff --git a/src/databricks/labs/ucx/source_code/graph.py b/src/databricks/labs/ucx/source_code/graph.py index e0ea2bf876..ad01acdde9 100644 --- a/src/databricks/labs/ucx/source_code/graph.py +++ b/src/databricks/labs/ucx/source_code/graph.py @@ -59,7 +59,7 @@ def register_dependency(self, dependency: Dependency) -> MaybeGraph: if not container: problem = DependencyProblem('dependency-register-failed', 'Failed to register dependency', dependency.path) return MaybeGraph(child_graph, [problem]) - problems = container.build_dependency_graph(child_graph) + problems = container.build_dependency_graph(child_graph, self._path_lookup) return MaybeGraph(child_graph, problems) def locate_dependency(self, path: Path) -> MaybeGraph: diff --git a/src/databricks/labs/ucx/source_code/site_packages.py b/src/databricks/labs/ucx/source_code/site_packages.py index 0b2ef29d0e..7dc0a78eb8 100644 --- a/src/databricks/labs/ucx/source_code/site_packages.py +++ b/src/databricks/labs/ucx/source_code/site_packages.py @@ -1,12 +1,9 @@ from __future__ import annotations import os -from dataclasses import dataclass from pathlib import Path -from collections.abc import Callable from databricks.labs.ucx.source_code.files import FileLoader from databricks.labs.ucx.source_code.path_lookup import PathLookup -from databricks.labs.ucx.source_code.files import FileLoader, SysPathProvider from databricks.labs.ucx.source_code.graph import ( Dependency, WrappingLoader, diff --git a/tests/unit/source_code/test_notebook.py b/tests/unit/source_code/test_notebook.py index 3850851d27..0baeda202d 100644 --- a/tests/unit/source_code/test_notebook.py +++ b/tests/unit/source_code/test_notebook.py @@ -3,7 +3,6 @@ import re import pytest -from databricks.labs.ucx.source_code.path_lookup import PathLookup from databricks.sdk.service.workspace import Language, ObjectType, ObjectInfo from databricks.sdk import WorkspaceClient diff --git a/tests/unit/source_code/test_s3fs.py b/tests/unit/source_code/test_s3fs.py index 83ea6f3146..4e0b2d31ee 100644 --- a/tests/unit/source_code/test_s3fs.py +++ b/tests/unit/source_code/test_s3fs.py @@ -9,7 +9,6 @@ DependencyGraphBuilder, ) from databricks.labs.ucx.source_code.files import FileLoader, LocalFileResolver -from databricks.labs.ucx.source_code.path_lookup import PathLookup from databricks.labs.ucx.source_code.whitelist import WhitelistResolver, Whitelist from tests.unit import ( _load_sources,