Skip to content

Conversation

@bniladridas
Copy link
Owner

Summary

  • Updated pre-commit-hooks revision from v4.4.0 to v6.0.0
  • Includes new features, bug fixes, and performance improvements
  • Requires Python >= 3.9
  • Removed deprecated hooks: check-byte-order-marker, fix-encoding-pragma

- 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
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1276). Please check your billing or try again later.


@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Pre-commit Hooks Core Update: The main pre-commit-hooks repository has been updated from v4.4.0 to v6.0.0, bringing new features, bug fixes, and performance improvements.
  • Tool Version Upgrades: Several key development tools have been updated to their latest stable versions, including black (22.10.0 -> 25.12.0), flake8 (6.0.0 -> 7.3.0), clang-format (v15.0.7 -> v21.1.7), mypy (v1.0.0 -> v1.19.0), bandit (1.7.6 -> 1.9.2), and python-safety-dependencies-check (v1.3.2 -> v1.4.2).
  • Python Version Requirement: The updated pre-commit-hooks now requires Python version 3.9 or higher.
  • Deprecated Hook Removal: Two deprecated hooks, check-byte-order-marker and fix-encoding-pragma, have been removed from the configuration.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

- id: yamllint
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 25.12.0
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

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

- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.3.0
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The version 7.3.0 for flake8 does not appear to be a valid release. This will prevent the hook from being installed. The latest version of flake8 is 7.1.0. Please use a valid version to ensure the pre-commit hooks can be installed correctly.

  rev: 7.1.0

- id: flake8
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.7
rev: v21.1.7
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The version v21.1.7 for mirrors-clang-format appears to be invalid. clang-format versions are tied to LLVM releases, and LLVM 21 has not been released. This will cause an error during hook installation. The latest version available in the mirrors-clang-format repository is v18.1.8.

  rev: v18.1.8

pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
rev: v1.19.0
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The version v1.19.0 for mypy is not a valid release, which will cause pre-commit to fail during setup. The latest version of mypy is v1.10.0. It's recommended to use a valid, existing version.

  rev: v1.10.0

- id: mypy
- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
rev: 1.9.2
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The specified version 1.9.2 for bandit does not exist. This will break the pre-commit setup as the hook cannot be installed. The latest version is 1.7.9. Please update to a valid version.

  rev: 1.7.9

args: [--skip, B101] # Skip assert checks
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.2
rev: v1.4.2
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

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
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1275). Please check your billing or try again later.


- Change flake8 rev from 7.3.0 to 7.1.0 as 7.3.0 is not available
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1275). Please check your billing or try again later.


- Change clang-format rev from v21.1.7 to v18.1.8 as v21.1.7 is not available
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1275). Please check your billing or try again later.


- Change mypy rev from v1.19.0 to v1.10.0 as v1.19.0 is not available
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1275). Please check your billing or try again later.


- Change bandit rev from 1.9.2 to 1.7.9 as 1.9.2 is not available
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1275). Please check your billing or try again later.


- Change safety rev from v1.4.2 back to v1.3.2 as v1.4.2 does not exist and repo is archived
@harperbot
Copy link

harperbot bot commented Dec 10, 2025

HarperBot

HarperBot Analysis

Error generating analysis: API quota exceeded (PR: Update pre-commit-hooks to v6.0.0, Model: gemini-2.0-flash, Diff length: 1075). Please check your billing or try again later.


@bniladridas bniladridas changed the title Update pre-commit-hooks to v6.0.0 chore(pre-commit): update hooks to v6.0.0 Dec 10, 2025
@bniladridas bniladridas merged commit 3c2b12c into main Dec 10, 2025
9 checks passed
@bniladridas bniladridas deleted the update-pre-commit-hooks-to-v6 branch December 10, 2025 21:41
@github-project-automation github-project-automation bot moved this from Todo to Done in github-dotfiles Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants