Dynamically creating type unions from a list of types
Open
Nobody has claimed this yet.
feature
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
I was trying to create a Router which takes a list of functions as input and based on these functions I want to dynamically create a generic output type which contains the Union of all function outputs.
Pitch
This would allow really complex routing to be typesafe.
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
No file, test, or entry point is named. Start by reviewing mypy's existing generic type inference and callable typing behavior, then define how a list of functions would produce a union type; done requires an agreed design and tests covering the proposed routing pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100