-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
handle match-case using a function argument #2671
Comments
And, thanks for working on and producing ruff. |
Duplicate of #282. |
Thanks for filing! Closing for now as it's being tracked elsewhere. |
Fixed as of v0.0.250. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw another issue about documenting a work-around for match/case. I am not sure if that is still relevant.
minimal snippet:
$ cat ruff.py
def f(arga):
match arga:
case 'hello':
print('you passed hello')
import sys
f(sys.argv[1])
Command:
ruff check ruff.py
No ruff settings (no pyproject.toml).
$ ruff --version
ruff 0.0.243
Error:
$ ruff check ruff.py
error: Failed to parse ruff.py: invalid syntax. Got unexpected token 'arga' at line 2 column 10
ruff.py:2:11: E999 SyntaxError: invalid syntax. Got unexpected token 'arga'
The text was updated successfully, but these errors were encountered: