Skip to content

[preview][E302] False positive in overload when comment added #11331

@randolf-scholz

Description

@randolf-scholz
@overload
def arrow_strip_whitespace(obj: Table, /, *cols: str) -> Table: ...
@overload
def arrow_strip_whitespace(obj: Array, /, *cols: str) -> Array: ...  # type: ignore[misc]
def arrow_strip_whitespace(obj, /, *cols):
    ...

This raises E302 on the line def arrow_strip_whitespace(obj, /, *cols). If I remove the type-ignore comment, it does not flag it anymore.

https://play.ruff.rs/cfc09a7a-1e90-4254-8e16-827aebd143c9

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpreviewRelated to preview mode features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions