Skip to content

Request: More autofixes for redundant-none-literal/PYI061 #14537

Closed
@Avasam

Description

@Avasam
def get_rotation(rotation: float | Literal[None, "horizontal", "vertical"]) -> float: ...

def spy(
    Z,
    precision: float | Literal["present"] = ...,
    marker=...,
    markersize=...,
    aspect: Literal["equal", "auto", None] | float = ...,
    origin: Literal["upper", "lower"] = ...,
    **kwargs,
) -> tuple[AxesImage, Line2D]: ...

class Axes(_AxesBase):
    def spy(
        self,
        Z,
        precision: float | Literal["present"] = 0,
        marker=...,
        markersize=...,
        aspect: Literal["equal", "auto", None] | float = "equal",
        origin: Literal["upper", "lower"] = ...,
        **kwargs,
    ) -> AxesImage | Line2D: ...
  • The command you invoked
    ruff check --fix --preview --select=PYI061 --isolated

  • The current Ruff version (ruff --version).
    ruff 0.8.0

Metadata

Metadata

Assignees

Labels

acceptedReady for implementationfixesRelated to suggested fixes for violationshelp wantedContributions especially welcome

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions