You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running ruff check for the first time on a Python file (version 3.13.1) containing match statements (ie either when ruff has just been installed, or the file has just been created), the error
is returned. This error is hard to debug as it will not appear for subsequent runs of ruff check in the same repo (all checks pass) -- I suspect this is why I've been unable to replicate in the playground
Replicated in Python 3.12 and Python 3.13 on Mac running Sequoia 15.3.1, and for the same Python versions on a Windows machine running WSL. MWE here: ruff-demo.zip
As a short-term fix you can either revert to ruff<=0.9.7 or include the line target-version = "py313" in your ruff config (I assume it would work for any version >3.9)