Incorrect type of `start` and `stop` keys in `StartStopEntry`
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 58/100
Research direction
Start in httomo/transform_loader_params.py around lines 34–42, where StartStopEntry defines the start and stop types. Update the annotations to represent omitted values, None, integers, and only the begin, mid, and end keywords; it is done when the type expresses all four stated constraints.
Written by the indexing model from the issue text.
Description
The values of the start and stop keys have the following constraints:
- can be omitted
- can be
None - can be an
int - can be any of the following "keywords":
begin,mid, andend
The current type for them is Union[int, str]: https://github.com/DiamondLightSource/httomo/blob/584e15ccd84fbd7f440454b6d3c48a071b8f2f83/httomo/transform_loader_params.py#L34-L42
which doesn't reflect all those constraints: it misses 1 and 2, and doesn't constraint the possible strings to be only the three available in 4.
I think the correct type would be NotRequired[Optional[Literal["begin"] | Literal["mid"] | Literal["end"]]].
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
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.
More from DiamondLightSource/httomo
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DiamondLightSource/httomo#714 ·
-
framework minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DiamondLightSource/httomo#699 ·
-
documentation question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/httomo#697 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
DiamondLightSource/httomo#609 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
DiamondLightSource/httomo#607 ·
All issues in DiamondLightSource/httomo
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100