Skip to content

Type ignore comment has no effect after argument type comment #5967

Closed
@JukkaL

Description

@JukkaL

This program generates an error on the first line even though there is a # type: ignore comment:

def f(x,  # type: x  # type: ignore
      ):
    # type: (...) -> None
    pass

Similarly, this generates an error even though it shouldn't:

def f(x=y,  # type: int  # type: ignore  # Name 'y' not defined
      ):
    # type: (...) -> None
    pass

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions