mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-22 05:20:36 +08:00
## Summary This PR uses Hawk 0.1.11 to narrow internal declarations to the visibility they actually need. Here, I've intentionally _only_ made visibility changes; unused API removals are split into follow-up PRs. In total, 1,201 declaration visibility modifiers are narrowed. Public generated formatter APIs and other declarations whose narrower visibility would activate dead-code or API-shape lints remain unchanged.
Ruff Python Parser
Ruff's Python parser is a hand-written recursive descent parser which can parse Python source code into an Abstract Syntax Tree (AST). It also utilizes the Pratt parsing technique to parse expressions with different precedence.
Try out the parser in the playground.
Contributing
Refer to the contributing guidelines to get started and GitHub issues with the parser label for issues that need help.
Versioning
This crate is an internal component of Ruff. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.7) is a component of Ruff 0.16.1. The source can be found here.
See Ruff's crate versioning policy for details on versioning.