DiamondLightSource / DiamondLightSource/cothread

Add type hints

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.