Skip to content

slice constructors are broken when using None #13376

Open
@KotlinIsland

Description

a: slice[None, None, None] = slice(None, None, None)
Incompatible types in assignment (expression has type "slice[int | Any, int | Any, int | Any]", variable has type "slice[None, None, None]")

playground

@overload
def __new__(
cls, start: int | None, stop: int | None, step: int | None = None, /
) -> slice[int | MaybeNone, int | MaybeNone, int | MaybeNone]: ...

found here: data-apis/array-api-extra#82 (comment)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions