Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a rust_python_ast crate #3370

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 6, 2023

This PR productionizes @MichaReiser's suggestion in #1820 (comment), by creating a separate crate for the ast module (rust_python_ast). This will enable us to further split up the ruff crate, as we'll be able to create (e.g.) separate sub-linter crates that have access to these common AST utilities.

This was mostly a straightforward copy (with adjustments to module imports), as the few dependencies that did require modifications were handled in #3366, #3367, and #3368.

@charliermarsh charliermarsh force-pushed the charlie/ruff_python_ast branch 2 times, most recently from ad54f9f to 83297ce Compare March 6, 2023 22:30
@charliermarsh
Copy link
Member Author

We could make this something more general, like ruff_python_syntax, as suggested in the linked issue, which would let us move more code into this crate (e.g., docstrings).

I actually went through with this change misremembering that suggestion. I don't feel strongly either way.

(If we use ruff_python_syntax, we probably want to then scope all this code under ruff_python_syntax::ast.)

@charliermarsh charliermarsh enabled auto-merge (squash) March 7, 2023 15:10
@charliermarsh charliermarsh merged commit bad6bdd into main Mar 7, 2023
@charliermarsh charliermarsh deleted the charlie/ruff_python_ast branch March 7, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants