8000 Folding/parsing issue in Python with generic type annotations and starargs · Issue #1536 · codemirror/dev · GitHub
[go: up one dir, main page]

Skip to content
Folding/parsing issue in Python with generic type annotations and starargs #1536
@DiegoBaldassarMilleuno

Description

@DiegoBaldassarMilleuno

Describe the issue

See reproduction link below.
Note that func2 and func3 fold correctly, but func1 does not.

Also, in JupyterLab with the same code in the line:

def func1(*args: tuple[int]) -> int:

the '>' character is highlighted differently than '-', so perhaps it's being parsed as a 'less-than' symbol instead of part of a return value type annotation. You can't see that in the online CodeMirror sandbox, though.

Browser and platform

Chrome version 133.0.6943.142

Reproduction link

See 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

      0