-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
CI Python formatting is confusing #135942
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 :) ). |
…=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`
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`
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`
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: