Skip to content

Incorrect ParseError for type comment in unexpected location #53

Closed
@JelleZijlstra

Description

@JelleZijlstra

From https://travis-ci.org/python/typeshed/jobs/212532837:

Running pytype tests...
pytd error processing "stdlib/2and3/cgi.pyi":
  File: "stdlib/2and3/cgi.pyi", line 107
    def values(self, key: Any) -> Any: ...  # type: ignore
                                            ^
ParseError: syntax error, unexpected TYPECOMMENT, expecting DEF or '@'

Type comments should be allowed here.

Metadata

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