Re:Ruff: An fast Python linter, written in Rust
by parlortricks on Tuesday February 14, 2023 @04:43PM
(#34796540)
Oh that explains why it is hung up on "match item['blah']:" then. I was scratching my head trying to work out what i had done wrong since the code worked fine.
Love the tool
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.