Pre-commit-hooks

Latest version: v5.0.0

Safety actively analyzes 714973 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 10

3.1.0

==================

Features
- `check-executables-have-shebangs`: on windows, validate the mode bits using
`git`
- 480 PR by mxr.
- 435 issue by dstandish.
- `requirements-txt-fixer`: support more operators
- 483 PR by mxr.
- 331 issue by hackedd.

Fixes
- `pre-commit-hooks-removed`: Fix when removed hooks used `args`
- 487 PR by pedrocalleja.
- 485 issue by pedrocalleja.

3.0.1

==================

Fixes
- `check-toml`: use UTF-8 encoding to load toml files
- 479 PR by mxr.
- 474 issue by staticdev.

3.0.0

==================

Features
- `detect-aws-credentials`: skip empty aws keys
- 450 PR by begoon.
- 449 issue by begoon.
- `debug-statements`: add detection `wdb` debugger
- 452 PR by itsdkey.
- 451 issue by itsdkey.
- `requirements-txt-fixer`: support line continuation for dependencies
- 469 PR by aniketbhatnagar.
- 465 issue by aniketbhatnagar.

Fixes
- `detect-aws-credentials`: fix `UnicodeDecodeError` when running on non-UTF8
files.
- 453 PR by asottile.
- 393 PR by a7p
- 346 issue by rpdelaney.

Updating
- pre-commit/pre-commit-hooks now requires python3.6.1+
- 447 PR by asottile.
- 455 PR by asottile.
- `flake8` / `pyflakes` have been removed, use `flake8` from `pycqa/flake8`
instead:

yaml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8


- 476 PR by asottile.
- 477 PR by asottile.
- 344 issue by asottile.

2.5.0

==================

Fixes
- Fix sorting of requirements which use `egg=...`
- 425 PR by vinayinvicible.
- Fix over-eager regular expression for test filename matching
- 429 PR by rrauenza.

Updating
- Use `flake8` from `pycqa/flake8` instead:

yaml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8

2.4.0

==================

Features
- Add diff output to `pretty-format-json` when run without `--autofix`.
- 408 PR by joepin.
- Add `--chars` option to `trailing-whitespace` fixer to control which
characters are stripped instead of all whitespace.
- 421 PR by iconmaster5326.

Fixes
- Fix `requirements-txt-fixer` when file does not end in a newline.
- 414 issue by barakreif.
- 415 PR by barakreif.
- Fix double printing of filename in `pretty-format-json`.
- 419 PR by asottile.

2.3.0

==================

Features
- Add `rpdb` to detected debuggers in `debug-statements`
- 389 PR by danlamanna.
- Add `check-toml` hook
- 400 PR by MarSoft.
- 400 PR by ssbarnea.

Fixes
- Add `__main__` block to `pre_commit.file_contents_sorter` so it can be
invoked using `python -m`
- 405 PR by squeaky-pl.

Misc.
- Fix `git-lfs` tests in azure pipelines
- 403 PR by ssbarnea.

Page 3 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.