Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve introspection and completion capabilities of entry point registries. #52

Open
amcgregor opened this issue Sep 20, 2017 · 1 comment
Assignees
Labels
2.enhancement New ideas or improvements. area:field Issues relating to Field implementations or their mechanics. area:trait Issues relating to specific existing or new traits.
Milestone

Comments

@amcgregor
Copy link
Member

Currently there is some either unacceptable behaviour (only Registry attributes are listed in completions) or erroneous behaviour (exceptions in REPL shells upon typing . and triggering completion). Depending on the IDE or editor's mechanism of collecting identifiers, this will also prohibit their own symbol indexing.

Attempting tab completion (or equivalent) or performing introspection (via dir() and friends) should list the available plugins, accounting for optional requirements.

@amcgregor amcgregor added 2.enhancement New ideas or improvements. area:field Issues relating to Field implementations or their mechanics. area:trait Issues relating to specific existing or new traits. labels Sep 20, 2017
@amcgregor amcgregor added this to the 1.1.3 Release milestone Sep 20, 2017
@amcgregor amcgregor self-assigned this Sep 20, 2017
@amcgregor
Copy link
Member Author

Initial improvements are in via 79034c0. Updates include:

  • Provides module-typical __all__ attribute which is a calculated list of only the available plugin names.
  • Overrides __dir__ (dir()) behaviour to include the results of __all__ in queries.

This corrects REPL shell behaviour for ptipython from a lengthy chain of explosions culminating in LookupError: Unknown plugin "__objclass__"; found: …:

screen shot 2017-09-19 at 21 45 29

With:

screen shot 2017-09-19 at 20 57 41

Requires tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.enhancement New ideas or improvements. area:field Issues relating to Field implementations or their mechanics. area:trait Issues relating to specific existing or new traits.
Projects
None yet
Development

No branches or pull requests

1 participant