MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _missing_import_targets

Function _missing_import_targets

tests/test_python_import_resolution.py:150–160  ·  view source on GitHub ↗
(checkout: Path)

Source from the content-addressed store, hash-verified

148
149
150def _missing_import_targets(checkout: Path) -> set[str]:
151 _write(checkout / "pkg" / "__init__.py", "")
152 source = _write(
153 checkout / "pkg" / "app.py",
154 "from .absent import helper\n"
155 "from pkg.absent import other\n\n"
156 "def run():\n"
157 " return helper(), other()\n",
158 )
159 result = extract([source, checkout / "pkg" / "__init__.py"], cache_root=checkout)
160 return {e["target"] for e in result["edges"] if e["relation"] == "imports_from"}
161
162
163def test_missing_relative_import_target_id_does_not_depend_on_the_checkout(tmp_path: Path):

Calls 2

extractFunction · 0.90
_writeFunction · 0.70

Tested by

no test coverage detected