Skip to content

Commit cad8aae

Browse files
author
wangjichao
committed
Chore: Resolve an import
1 parent 02de6a9 commit cad8aae

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

codebase_rag/parsers/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
SimpleNameLookup,
1919
TreeSitterNodeProtocol,
2020
)
21+
from ..utils.path_utils import calculate_paths
2122

2223
if TYPE_CHECKING:
2324
from ..language_spec import LanguageSpec
@@ -116,16 +117,14 @@ def ingest_method(
116117

117118
if file_path and repo_path and project_name:
118119
try:
119-
from ..utils.path_utils import calculate_paths
120-
121120
paths = calculate_paths(
122121
file_path=file_path,
123122
repo_path=repo_path,
124123
)
125124
method_props[cs.KEY_PATH] = paths["relative_path"]
126125
method_props[cs.KEY_ABSOLUTE_PATH] = paths["absolute_path"]
127126
method_props[cs.KEY_PROJECT_NAME] = project_name
128-
except (ImportError, ValueError, TypeError) as e:
127+
except (ValueError, TypeError) as e:
129128
logger.warning(logs.METHOD_PATH_CALC_FAILED.format(qn=method_qn, error=e))
130129

131130
logger.info(logs.METHOD_FOUND.format(name=method_name, qn=method_qn))

0 commit comments

Comments
 (0)