Skip to content

Type comments #1084

@yangdanny97

Description

@yangdanny97

AFAIK Pyrefly doesn't support type comments for type hints like others do, such as Pylance. Although this isn't an issue for those using Python 3.5+, type comments are really helpful for me and possibly others who struggle with projects in older versions of Python.

Pyrefly does offer great performance improvements, which is why I switched to it. However, the lack of support for type comments is really a pain point for me, and I hope Pyrefly consider adding this feature🙏


Some examples, more info here

a = 1  # type: int

def foo(a, b):  # type: (int, int) -> int
    return a + b

Originally posted by @sjet47 in #407 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions