support for easy limiting of literals to entrypoint names and/or the entrypoint lookup value
Open
Nobody has claimed this yet.
feature
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
for utilities where names/types match to entry-pints, it would be really nice to be able to do that without making a plugin each time
example
class MyPlugin:
pass
PluginName = Typevar("PluginName", EntrypointLiteral["myapp.plugin"]
class MyApp:
def __getattr__(self, name: PluginName) -> InstanceOfEntrypoint[PluginName]:
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed EntrypointLiteral and InstanceOfEntrypoint forms and the getattr example. Clarify how entrypoint names and lookup values should be limited without a plugin, then define the expected typing behavior for the shown MyPlugin and MyApp example. Done means the feature’s scope and behavior are specified well enough to guide implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100