Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for tab completion #22

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Support for tab completion #22

wants to merge 6 commits into from

Conversation

kyleaoman
Copy link
Member

This PR adds support for tab completion by implementing __dir__ where needed to inject attributes held by objects wrapped by helper classes into the relevant namespace. Closes #16

Current implementation works, is documented and tested.

However, attributes are accessed internally for some reason when dir() is doing its thing, triggering lazy loading. The upshot is that doing sg = SWIFTGalaxy(...) and then sg.<tab><tab> immediately starts reading the entire snapshot into memory. Not ideal.

@kyleaoman kyleaoman added the enhancement New feature or request label Dec 1, 2024
@kyleaoman kyleaoman self-assigned this Dec 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab completion doesn't pass through from swiftsimio
1 participant