Skip to content

Add ruff format to pre-commit, run it, except the benchmarks#410

Merged
hugovk merged 18 commits into
python:mainfrom
maurycy:ruff-format
Sep 22, 2025
Merged

Add ruff format to pre-commit, run it, except the benchmarks#410
hugovk merged 18 commits into
python:mainfrom
maurycy:ruff-format

Conversation

@maurycy

@maurycy maurycy commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

This should be the last one from this series:

#405 (comment)

@maurycy maurycy changed the title ruff format Add ruff format to pre-commit, run it, except the benchmarks Sep 5, 2025
Comment thread .github/workflows/pre-commit.yml Outdated
@maurycy

maurycy commented Sep 5, 2025

Copy link
Copy Markdown
Contributor Author

@hugovk Did you review and not submit? Not pushing in any way. I see nothing here but you were active and there's "Apply suggestions" label on "My work" tab:

image

@hugovk

hugovk commented Sep 8, 2025

Copy link
Copy Markdown
Member

Yes, I started a review but didn't finish yet :)

Interesting GH says there are suggestions when they're not visible or actionable yet.

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's also add these rules:

  "I",      # isort
  "ISC",    # flake8-implicit-str-concat
  "RUF022", # unsorted-dunder-all
  "RUF100", # unused noqa (yesqa)

Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread doc/changelog.rst Outdated
Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread .pre-commit-config.yaml
Comment thread pyperformance/_benchmark_selections.py Outdated

@maurycy maurycy left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hugovk

Thank you for a great and careful review!

I've addressed all the comments. Also, I ensured that the GitHub Action and .pre-commit-config.yaml use the latest plugins.

Is there are any list of recommended Ruff rules? For example, RUF022 is not particularly popular. Generally, which projects have the most referential pyproject.toml?

Comment thread pyperformance/_utils.py Outdated
@maurycy maurycy requested a review from hugovk September 8, 2025 21:18

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there are any list of recommended Ruff rules?

Not really.

For example, RUF022 is not particularly popular. Generally, which projects have the most referential pyproject.toml?

Of those linked, I help maintain cherry-picker and python-docs-theme.

Comment thread .github/workflows/lint.yml Outdated
Comment thread .github/workflows/lint.yml Outdated
Comment thread pyperformance/_utils.py Outdated
maurycy and others added 3 commits September 11, 2025 17:38
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@maurycy maurycy requested a review from hugovk September 11, 2025 18:55

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I'll leave this a bit to see if anyone else has suggestions.

@hugovk

hugovk commented Sep 22, 2025

Copy link
Copy Markdown
Member

10 days is long enough, let's merge. Thanks!

@hugovk hugovk merged commit 553aa5d into python:main Sep 22, 2025
20 checks passed
@maurycy maurycy deleted the ruff-format branch September 22, 2025 17:21
maurycy added a commit to maurycy/pyperformance that referenced this pull request Sep 22, 2025
* main:
  Add `ruff format` to pre-commit, run it, except the benchmarks (python#410)
hugovk added a commit to hugovk/pyperformance that referenced this pull request Oct 23, 2025
…n#410)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
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