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

Support for match statement #2545

Closed
AxTheB opened this issue Feb 3, 2023 · 2 comments
Closed

Support for match statement #2545

AxTheB opened this issue Feb 3, 2023 · 2 comments

Comments

@AxTheB
Copy link

AxTheB commented Feb 3, 2023

README claims python3.11 compatibility, but ruff fails at match statements:

"""This is working match statement"""
match "data":
    case "data":
        print("Match!")

When run in python, produces "Match!". Pylint says its 10.00/10, ruff fails:

ruff -v test1.py 
[2023-02-03][15:55:04][globset][DEBUG] built glob set; 19 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
[2023-02-03][15:55:04][ruff::commands][DEBUG] Identified files to lint in: 611.569µs
error: Failed to parse test1.py: invalid syntax. Got unexpected token "data" at line 2 column 7
[2023-02-03][15:55:04][ruff::commands][DEBUG] Checked 1 files in: 1.152863ms
test1.py:2:8: E999 SyntaxError: invalid syntax. Got unexpected token "data"
Found 1 error.

There is no pyproject.toml or other setup. ruff --version says ruff 0.0.240

@Jackenmen
Copy link
Contributor

Duplicate of #282

@AxTheB AxTheB closed this as completed Feb 3, 2023
@charliermarsh
Copy link
Member

Fixed as of v0.0.250.

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

3 participants