-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Split off ruff_cli crate from ruff library #1816
Conversation
5f7e95d
to
be8405b
Compare
be8405b
to
3aa06c4
Compare
Nice! This will be a big improvement. Before I dig in, I just want to confirm: there are intended to be no behavior changes here, right? As in, Ruff itself should function identically? Purely an internal refactor? |
Yes exactly. |
3aa06c4
to
8414d5f
Compare
I just checked locally, looks like maturin is having trouble with this kind of layout, mostly related to
I'll take a look tomorrow. |
8414d5f
to
f2186b5
Compare
@not-my-profile - How big of a problem will it be for you if I make some changes to the |
Thanks for asking :) You could merge the first two commits from this PR first (I just opened #1822 for that). Then you can change the resolution code without causing headaches :) (The remaining two commits of this PR can be easily rebased.) |
f2186b5
to
7d35d3d
Compare
@not-my-profile - Hope you feel empowered to keep pushing on these sorts of refactors. They're making the project much stronger. |
7d35d3d
to
5f66a1b
Compare
6784893
to
9e19873
Compare
Will review (and hopefully merge) later today. |
@not-my-profile - Can I squash the Clippy commit? |
documentation = "https://github.com/charliermarsh/ruff" | ||
homepage = "https://github.com/charliermarsh/ruff" | ||
repository = "https://github.com/charliermarsh/ruff" | ||
readme = "../README.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@messense - This was also necessary. As-is, ruff-0.0.220.dist-info/METADATA
was missing the README contents.
Okay, the packages are looking more similar now: Before:
After:
|
@not-my-profile - In fact, can we squash this to a single commit, with the message you want? I had to fix one bug (the missing README), then merged to resolve conflicts and verify that the contents on |
This lets you test the ruff linters or use the ruff library without having to compile the ~100 additional dependencies that are needed by the CLI. Because we set the following in the [workspace] section of Cargo.toml: default-members = [".", "ruff_cli"] `cargo run` still runs the CLI and `cargo test` still tests the code in src/ as well as the code in the new ruff_cli crate. (But you can now also run `cargo test -p ruff` to only test the linters.)
c699030
to
7a496c0
Compare
Since the first commit doesn't edit the files of the second commit and the clippy commit isn't that important, sure ... squashed into one :) Thanks for the fixes! |
Awesome - thank you both! |
(I missed that we also have to update a command in the |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `^0.0.220` -> `^0.0.221` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.221/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.221/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.221/compatibility-slim/0.0.220)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.221/confidence-slim/0.0.220)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.221`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.221) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.220...v0.0.221) #### What's Changed - Document the way extend-ignore/select are applied by [@​jankatins](https://togithub.com/jankatins) in [https://github.com/charliermarsh/ruff/pull/1839](https://togithub.com/charliermarsh/ruff/pull/1839) - Implement `PLR2004` (`MagicValueComparison`) by [@​max0x53](https://togithub.com/max0x53) in [https://github.com/charliermarsh/ruff/pull/1828](https://togithub.com/charliermarsh/ruff/pull/1828) - Use absolute paths for --stdin-filename matching by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1843](https://togithub.com/charliermarsh/ruff/pull/1843) - \[`flake8-bugbear`] Fix False Positives for `B024` & `B027` by [@​saadmk11](https://togithub.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1851](https://togithub.com/charliermarsh/ruff/pull/1851) - Clarify that some flake8-bugbear opinionated rules are already implemented by [@​nsoranzo](https://togithub.com/nsoranzo) in [https://github.com/charliermarsh/ruff/pull/1847](https://togithub.com/charliermarsh/ruff/pull/1847) - \[`isort`] Add `classes` Config Option by [@​saadmk11](https://togithub.com/saadmk11) in [https://github.com/charliermarsh/ruff/pull/1849](https://togithub.com/charliermarsh/ruff/pull/1849) - Implement `PLR0133` (`ComparisonOfConstants`) by [@​max0x53](https://togithub.com/max0x53) in [https://github.com/charliermarsh/ruff/pull/1841](https://togithub.com/charliermarsh/ruff/pull/1841) - Remove non-magic trailing comma from tuple by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1854](https://togithub.com/charliermarsh/ruff/pull/1854) - Improve spacing preservation for `C405` fixes by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1855](https://togithub.com/charliermarsh/ruff/pull/1855) - Refactor import-tracking to leverage existing AST bindings by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1856](https://togithub.com/charliermarsh/ruff/pull/1856) - Split off ruff_cli crate from ruff library by [@​not-my-profile](https://togithub.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/1816](https://togithub.com/charliermarsh/ruff/pull/1816) - Added ALE by [@​colin99d](https://togithub.com/colin99d) in [https://github.com/charliermarsh/ruff/pull/1857](https://togithub.com/charliermarsh/ruff/pull/1857) - Add workaround for wasm-pack bug to fix the playground CI by [@​not-my-profile](https://togithub.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/1861](https://togithub.com/charliermarsh/ruff/pull/1861) - Actually fix wasm-pack build command by [@​not-my-profile](https://togithub.com/not-my-profile) in [https://github.com/charliermarsh/ruff/pull/1862](https://togithub.com/charliermarsh/ruff/pull/1862) - Avoid unnecessary allocations for module names by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/1863](https://togithub.com/charliermarsh/ruff/pull/1863) #### New Contributors - [@​jankatins](https://togithub.com/jankatins) made their first contribution in [https://github.com/charliermarsh/ruff/pull/1839](https://togithub.com/charliermarsh/ruff/pull/1839) - [@​max0x53](https://togithub.com/max0x53) made their first contribution in [https://github.com/charliermarsh/ruff/pull/1828](https://togithub.com/charliermarsh/ruff/pull/1828) - [@​nsoranzo](https://togithub.com/nsoranzo) made their first contribution in [https://github.com/charliermarsh/ruff/pull/1847](https://togithub.com/charliermarsh/ruff/pull/1847) **Full Changelog**: astral-sh/ruff@v0.0.220...v0.0.221 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDIuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEwMi4wIn0=--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
I'd really love to get this back. I don't understand why it broke as we still have the top-level |
Oh, wait, I see that now too... |
I don't think this PR changed any files that GitHub uses for dependency tracking ... maybe GitHub just cannot handle how many projects depend on ruff :P |
Interestingly, I now see this, which toggles between the results. I wonder if there's any way to avoid the Rust version from showing up. Oh, maybe this is because we took the ruff crate? |
Please preserve the commits when merging.