-
Notifications
You must be signed in to change notification settings - Fork 1
chore(pre-commit): update hooks to v6.0.0 #28
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
Conversation
- Updated rev from v4.4.0 to v6.0.0 for pre-commit/pre-commit-hooks - This includes new features, fixes, and requires Python >= 3.9 - Removed hooks: check-byte-order-marker, fix-encoding-pragma
Summary of ChangesHello @bniladridas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on modernizing the project's development environment by upgrading various pre-commit hooks and associated tools to their latest versions. This ensures that the codebase benefits from the most recent advancements in code quality, formatting, and security analysis, while also aligning with updated Python version requirements. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request aims to update various pre-commit hooks, which is a great initiative for keeping the development tooling current. However, I've noticed that most of the specified new versions for the hooks are not valid releases and do not exist. This will cause the pre-commit installation to fail, breaking the local development and CI environments. I have provided specific comments for each invalid version with suggestions for the latest valid versions. Please update the versions to valid ones. Additionally, for better clarity, you might consider updating the pull request title and description to reflect that multiple hooks are being updated, not just pre-commit-hooks.
.pre-commit-config.yaml
Outdated
| - id: yamllint | ||
| - repo: https://github.com/psf/black | ||
| rev: 22.10.0 | ||
| rev: 25.12.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version 25.12.0 for black does not seem to exist. Black uses a year-based versioning scheme (YY.M.P), and version 25.12.0 has not been released. This will cause pre-commit to fail when trying to install the hook. The latest stable version is 24.4.2. I suggest updating to a recent, valid version.
rev: 24.4.2
.pre-commit-config.yaml
Outdated
| - id: black | ||
| - repo: https://github.com/pycqa/flake8 | ||
| rev: 6.0.0 | ||
| rev: 7.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pre-commit-config.yaml
Outdated
| - id: flake8 | ||
| - repo: https://github.com/pre-commit/mirrors-clang-format | ||
| rev: v15.0.7 | ||
| rev: v21.1.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pre-commit-config.yaml
Outdated
| pass_filenames: false | ||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: v1.0.0 | ||
| rev: v1.19.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pre-commit-config.yaml
Outdated
| - id: mypy | ||
| - repo: https://github.com/PyCQA/bandit | ||
| rev: 1.7.6 | ||
| rev: 1.9.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.pre-commit-config.yaml
Outdated
| args: [--skip, B101] # Skip assert checks | ||
| - repo: https://github.com/Lucas-C/pre-commit-hooks-safety | ||
| rev: v1.3.2 | ||
| rev: v1.4.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version v1.4.2 for Lucas-C/pre-commit-hooks-safety does not exist. The latest tag on this repository is v1.3.2, which is the version you are updating from. This will cause the hook installation to fail. Furthermore, this repository has been archived. You should consider migrating to an alternative hook for checking security vulnerabilities in dependencies, such as the official safety hook from pyupio/safety or pip-audit.
rev: v1.3.2- Change black rev from 25.12.0 to 24.4.2 as 25.12.0 is not available
- Change flake8 rev from 7.3.0 to 7.1.0 as 7.3.0 is not available
- Change clang-format rev from v21.1.7 to v18.1.8 as v21.1.7 is not available
- Change mypy rev from v1.19.0 to v1.10.0 as v1.19.0 is not available
- Change bandit rev from 1.9.2 to 1.7.9 as 1.9.2 is not available
- Change safety rev from v1.4.2 back to v1.3.2 as v1.4.2 does not exist and repo is archived
Summary