Skip to content

Run ruff on the packages repo#4023

Draft
adamjstewart wants to merge 2 commits intospack:developfrom
adamjstewart:style/ruff
Draft

Run ruff on the packages repo#4023
adamjstewart wants to merge 2 commits intospack:developfrom
adamjstewart:style/ruff

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

One-line change to pyproject.toml and ruff check now passes for the entire repo. No need for any fancy post-processing scripts @johnwparent. Long URLs/checksums are automatically ignored by ruff, and we already ignore all other offending rules. I was actually able to remove several unused ignores in the process.

Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com>
Signed-off-by: Adam J. Stewart <ajstewart426@gmail.com>
@adamjstewart
Copy link
Copy Markdown
Member Author

Cross-linking to spack/spack#52156 and spack/spack#52161.

@johnwparent
Copy link
Copy Markdown
Contributor

johnwparent commented Mar 28, 2026

Great!
I could not get
version("1.0", url="https://example.com/this-is-a-really-long-url/that-goes-over-99-characters/that-ruff-will-not-ignore-by-default",) to pass ruff check, so I'm not sure what I was doing wrong ...

@adamjstewart
Copy link
Copy Markdown
Member Author

Ruff will reformat that line onto multiple lines, but it won't complain about the resulting long line.

@johnwparent
Copy link
Copy Markdown
Contributor

johnwparent commented Mar 28, 2026

Huh... maybe I was testing check and format in isolation too much... glad I only spent < an hour on that useless filter.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants