Skip to content

Conversation

@maurycy
Copy link

@maurycy maurycy commented Jan 2, 2026

This is very similar to what was done in pyperformance:

ruff is used since fdfd482, but was never enforced.

I can split ruff check and ruff format into two separate PRs for readability, similarly to python/pyperformance#405 and python/pyperformance#410 but ruff check is clean here:

2026-01-02T21:25:39.780432000+0100 maurycy@gimel /Users/maurycy/src/pyperf (maurycy-ruff-ci) % uvx ruff check
All checks passed!

The PR also adds pre-commit, Dependabot and updates Github Action checkout.

@maurycy maurycy changed the title ruff check and ruff format ci: ruff check and ruff format Jan 2, 2026
@maurycy maurycy changed the title ci: ruff check and ruff format ruff check and ruff format github action Jan 2, 2026
@vstinner
Copy link
Member

vstinner commented Jan 5, 2026

I'm not convinced that ruff format makes the code easier to read/maintain.

@corona10: Do you have an opinion on this change?

@maurycy
Copy link
Author

maurycy commented Jan 5, 2026

@vstinner Thank you for taking a look.

It's customizable. We can figure out a set of extend-select, extend-ignore etc. flags that minimize the amount of changes, yet enforce some rules.

Some background here: I was thinking about plugging in profiling.sampling over the holidays (the idea was to run all the pyperformance benchmarks with it). The attempt made me realize that's not exactly trivial to do it well but also there's no style to adher to.

I can remove the format part, and leave the rest (ie: pre-commit, Gihub action updates and Dependabot.)


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
Copy link
Member

@vstinner vstinner Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should write a separated PR for these changes and the .github/dependabot.yml change.

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