Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing comma in Annotated causes an error #248

Open
bellini666 opened this issue Oct 27, 2023 · 0 comments
Open

Trailing comma in Annotated causes an error #248

bellini666 opened this issue Oct 27, 2023 · 0 comments

Comments

@bellini666
Copy link

class Foo:
    foo: Annotated[
        str,
        something_else,
    ]
    bar: Annotated[
        str,
        something_else,
    ]

This piece of code causes an error in the parser. If I remove the trailing comma the error will be gone.

I can see the error in neovim, but can't replicate it in https://tree-sitter.github.io/tree-sitter/playground, which might be running an older version, so this might be a regression as pointed out in nvim-treesitter/nvim-treesitter#5575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant