Skip to content
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

MAINT - Update pre-commit hooks and config #2044

Closed

Conversation

trallard
Copy link
Collaborator

@trallard trallard commented Nov 20, 2024

While working on another PR, I noticed some additions that would be beneficial here, so I decided to clean our pre-commit hooks and configuration.

So that you know, I will open a separate follow-up PR with the actual fixes to make the review easier.

Notable items:

  • Since we are using ruff, it did not make sense to have black separately as ruff is compatible with black
  • Added pre-commits to deal with imports, trailing whitespace, and end-of-file-fixer
  • Replaces the unmaintained and archived prettier hook

Closes #1880
Closes #2047

@trallard trallard added tag: dependencies Pull requests that update a dependency file kind: maintenance Improving maintainability and reducing technical debt labels Nov 20, 2024
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/pydata_sphinx_theme
  utils.py
Project Total  

This report was generated by python-coverage-comment-action

Carreau
Carreau previously approved these changes Nov 20, 2024
drammock
drammock previously approved these changes Nov 20, 2024
Copy link
Collaborator

@drammock drammock left a comment

Choose a reason for hiding this comment

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

LGTM just a couple minor comments

@@ -68,3 +65,9 @@ repos:
# stylelint itself needs to be here when using additional_dependencies.
- [email protected]
Copy link
Collaborator

Choose a reason for hiding this comment

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

odd that this version (16.5.0) doesn't match rev: v16.10.0 above

.pre-commit-config.yaml Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Co-authored-by: Daniel McCloy <[email protected]>
@Carreau
Copy link
Collaborator

Carreau commented Nov 21, 2024

I think this PR and #2045 have diverged; which one is the cannonical one ?

@trallard
Copy link
Collaborator Author

Will open a fresh one @Carreau

@trallard
Copy link
Collaborator Author

Got it! Opened a new follow-up PR #2049 so these two should be now ready to merge I believe

@Carreau
Copy link
Collaborator

Carreau commented Nov 21, 2024

I'm going to likely merge #2049 directly as this would need to get the logging fix into it as well. I'm going to move to draft to avoid extra reviews.

@Carreau Carreau marked this pull request as draft November 21, 2024 13:33
Carreau added a commit that referenced this pull request Nov 21, 2024
Follows-up #2044

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel McCloy <[email protected]>
Co-authored-by: M Bussonnier <[email protected]>
@Carreau
Copy link
Collaborator

Carreau commented Nov 21, 2024

Closing as #2049 was merged.

@Carreau Carreau closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: maintenance Improving maintainability and reducing technical debt tag: dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loggers should never use f-strings Prettier pre-commit has been archived
3 participants