Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions backend/services/dependency_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ def _resolve_import_to_file(
) -> str:
"""Resolve an import to an actual file in the repo"""

# External dependency check
if not import_path.startswith('.') and not import_path.startswith('/'):
# Might still be internal for Python packages
if '/' not in import_path:
return None
# Skip obvious external packages (stdlib, third-party without dots)
# But allow dotted imports like 'starlette.exceptions' to be resolved below
if not import_path.startswith('.') and '.' not in import_path and '/' not in import_path:
# Single-word imports (os, sys, json) are always external
return None

source_path = Path(source_file)
source_dir = source_path.parent
Expand Down