cortex-local 2.0.8__tar.gz → 2.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cortex_local-2.0.8 → cortex_local-2.0.10}/PKG-INFO +1 -1
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/code_graph.py +15 -1
- {cortex_local-2.0.8 → cortex_local-2.0.10}/pyproject.toml +1 -1
- {cortex_local-2.0.8 → cortex_local-2.0.10}/README.md +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/__init__.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/cli.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/config.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/__init__.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/cache.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/chunker.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/global_graph.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/graph.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/core/notes_graph.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/embedder.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/indexer.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/mcp_server.py +0 -0
- {cortex_local-2.0.8 → cortex_local-2.0.10}/cortex/state.py +0 -0
|
@@ -81,7 +81,21 @@ def _resolve_import(source_file: str, imp: str, all_files: set, ext: str):
|
|
|
81
81
|
imp = target + imp[len(alias):]
|
|
82
82
|
break
|
|
83
83
|
|
|
84
|
-
if imp.startswith("."):
|
|
84
|
+
if imp.startswith(".") and ext == ".py":
|
|
85
|
+
dots = len(imp) - len(imp.lstrip("."))
|
|
86
|
+
module = imp[dots:].replace(".", "/")
|
|
87
|
+
base = Path(source_file).parent
|
|
88
|
+
for _ in range(dots - 1):
|
|
89
|
+
base = base.parent
|
|
90
|
+
candidate = (base / module).as_posix().lstrip("/") if module else base.as_posix().lstrip("/")
|
|
91
|
+
if candidate + ".py" in all_files:
|
|
92
|
+
return candidate + ".py"
|
|
93
|
+
if candidate + "/__init__.py" in all_files:
|
|
94
|
+
return candidate + "/__init__.py"
|
|
95
|
+
if candidate in all_files:
|
|
96
|
+
return candidate
|
|
97
|
+
return None
|
|
98
|
+
elif imp.startswith("."):
|
|
85
99
|
base = Path(source_file).parent
|
|
86
100
|
candidate = (base / imp).as_posix().lstrip("/")
|
|
87
101
|
for try_ext in (ext, ".ts", ".tsx", ".js", ".jsx", ".svelte"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|