-
Notifications
You must be signed in to change notification settings - Fork 13.3k
CI Python formatting is confusing #135942
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Comments
cc @Kobzol |
Could you please send a link to the workflow where the formatting error was reported? Locally it shows me this:
|
Ah, |
#135950 should fix the mentioned issues. I documented the Python checks in the rustc dev guide, fixed the diff problem, and also improved the creation of virtual environments (and its error messages :) ). |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 24, 2025
…=onur-ozkan Tidy Python improvements Fixes display of Python formatting diffs in tidy, and refactors the code to make it simpler and more robust. Also documents Python formatting and linting in the Rustc dev guide. Fixes: rust-lang#135942 r? `@onur-ozkan`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 24, 2025
Rollup merge of rust-lang#135950 - Kobzol:tidy-python-improvements, r=onur-ozkan Tidy Python improvements Fixes display of Python formatting diffs in tidy, and refactors the code to make it simpler and more robust. Also documents Python formatting and linting in the Rustc dev guide. Fixes: rust-lang#135942 r? `@onur-ozkan`
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this issue
Jan 27, 2025
Tidy Python improvements Fixes display of Python formatting diffs in tidy, and refactors the code to make it simpler and more robust. Also documents Python formatting and linting in the Rustc dev guide. Fixes: rust-lang/rust#135942 r? `@onur-ozkan`
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
When there is a python formatting error in CI, it prints the following confusing message:
Some issues:
./x test tidy --extra-checks=py
returns an error about virtualenv not installedpython3 -m pip install virtualenv
returns an error about an externally-managed-environmentbrew install virtualenv
seemed to do somethingpython3.11 -m pip install virtualenv
does something./x test tidy --extra-checks=py
fails with something aboutruff
not being installedbrew install ruff
seemed to do something./x test tidy --extra-checks=py
now seems to work 🎉 but it does not show me the diff 😦./x test tidy --extra-checks=py:fmt --bless
updated the fileThe text was updated successfully, but these errors were encountered: