Skip to content

Ge init go to definition - #157

Merged
ShantanuKodgirwar merged 2 commits into
mainfrom
ge-init-go-to-definition
Nov 24, 2026
Merged

ShantanuKodgirwar merged 2 commits into
mainfrom
ge-init-go-to-definition

Conversation

@ShantanuKodgirwar

Copy link
Copy Markdown
Contributor

What and why

Ctrl+click on names imported from PtyLab.Engines.GradientEngine did nothing in VS Code, because the package loads its names lazily.

  • PtyLab/Engines/GradientEngine/__init__.py: add TYPE_CHECKING imports so the editor can follow them, write __all__ out as a list, and drop the _MODULES table.

How it was tested

Ran the GradientEngine tests, and checked that importing the package still does not load torch.

Notes

The first use of any public name now loads all GradientEngine submodules at once.

@ShantanuKodgirwar
ShantanuKodgirwar merged commit 1ac8f06 into main Nov 24, 2026
6 checks passed
@ShantanuKodgirwar
ShantanuKodgirwar deleted the ge-init-go-to-definition branch November 24, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant