|
|
|
|
|
by bobuk
1214 days ago
|
|
I'm a big fan but be careful, Ruff doesn't support current versions of python >=3.11 yet.
Instead of direct python parsing ruff uses RustPython, that is still lack of match operator support and other modern 3.10+ stuff. If you're ok with that - go ahead and switch to ruff, you will never get back. |
|
If interested: CPython moved to a new parser, a PEG parser, in Python 3.9, and part of the motivation was to support language features like pattern matching, which introduced ambiguities in the grammar that the existing parser couldn't handle. For the same reason, they've been non-trivial to implement in the RustPython parser -- they either require clever techniques, or the parser needs to be written as a PEG parser. I am hoping to do the former, but I need to find time to prioritize it.