Commit Graph
2 Commits
Author SHA1 Message Date
Mpasha17 75e9f102bf fix(extract): only redirect a file-stem forward ref to a local class (#4334)
Keep v8's sourceless stub and resolve after the walk: rewrite to the local
id only when that id is a class defined in this file. An imported name (e.g.
pkg/widget.py doing `from .base import Widget`) or a same-id function like
`def widget()` now falls through to the cross-file rewire exactly as on v8.

Co-Authored-By: Grok Bot
(cherry picked from commit 1511543938)
2026-10-12 22:37:55 +01:00
Mpasha17 672441393e fix(extract): keep Python file node when a same-named class is forward-referenced (#4334)
A type hint like `w: Widget` before `class Widget` in widget.py minted a
bare 'widget' stub, which collides with the file node id once paths are made
relative, so the file node vanished and Widget ended up containing itself.
Point that reference at the local class id instead.

Co-Authored-By: Grok Bot
(cherry picked from commit c25d1626e9)
2026-10-12 22:37:55 +01:00