DiamondLightSource / DiamondLightSource/cothread
Add type hints
Open
- Dominant language
- C
- Stars
- 13
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, cothread does not play nicely with type hinting in the rest of your code.
This could be done to a limited extent, as with [aioca](https://github.com/dls-controls/aioca/). For example, a `Protocol` is used [here](https://github.com/dls-controls/aioca/blob/master/aioca/types.py#L96) to make the list of additional attributes on an `AugmentedValue` clear.
Alternatively, this could be done more comprehensively using constrained `TypeVar`s and Generics. Python typing is not perfect, so this may introduce problems.
Contributor guide
Assessment
This issue has not been assessed yet.