DiamondLightSource / DiamondLightSource/httomo

Incorrect type of `start_offset` and `stop_offset` keys in `StartStopEntry`

Open
#611 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10
Forks
5
Avg merge
5d 17h
Merged PRs (30d)
1

Description

The values of the `start_offset` and `stop_offset` keys have the following constraints:
1. can be omitted
2. can be `None`
3. can be an `int`

The current type for them is `Optional[int]`: 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.

I think the correct type would be `NotRequired[Optional[int]]`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.