Skip to content

Incorrect type of start_offset and stop_offset keys in StartStopEntry #611

@yousefmoazzam

Description

@yousefmoazzam

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]:

class StartStopEntry(TypedDict):
"""
Configuration for a single dimension's previewing in terms of start/stop values.
"""
start: Union[int, str]
start_offset: Optional[int]
stop: Union[int, str]
stop_offset: Optional[int]

which doesn't reflect all those constraints: it misses 1 and 2.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions