Ruff v0.4.0: a hand-written recursive descent parser for Python
Ruff migrates to a hand-written recursive descent parser: >2x faster, with error recovery capabilities.
An extremely fast Python linter and code formatter, written in Rust.
Ruff migrates to a hand-written recursive descent parser: >2x faster, with error recovery capabilities.
Last week I wanted to start contributing to rust. I was working on Adding uninitialized attribute access check to Ruff. I did it and learned a lot about how to track attributes in Python code. A gist of it would be, you need to go over the class, in each function when something is assigned to a name you need to check if that name is self or cls. And you do this by checking if it matches the first argument of that function. Then if the function is a class method it’s cls and otherwise self.