Update pre-commit hook pre-commit/pre-commit-hooks to v4
Notable changes
requirements-txt-fixer
: remove duplicate packages.fix-encoding-pragma
: deprecated -- will be removed in 5.0.0. userequirements-txt-fixer
: also sortconstraints.txt
by default.debug-statements
: addbpdb
debugger.file-contents-sorter
: fix sorting an empty file.double-quote-string-fixer
: don't rewrite inside f-strings in 3.12+.- now requires python >= 3.8.
- forbid-submodules: new hook which outright bans submodules.
check-executables-have-shebangs
: usegit config core.fileMode
to determine if it should querygit
.name-tests-test
: add--pytest-test-first
test convention.check-shebang-scripts-are-executable
: update windows instructions.check-toml
: use stdlibtomllib
when available.check-added-large-files
: don't run on non-filestages
.name-tests-test
: updated display text.check-docstring-first
: make output more parsable.check-merge-conflict
: make output more parsable.debug-statements
: make output more parsable.check-merge-conflict
: fix detection of======
conflict marker on windows.- Drop python<3.7.
- Changed default branch from
master
tomain
. debug-statements
: addpdbr
debugger.detect-private-key
: add detection for additional key types.check-executables-have-shebangs
: improve messaging on windows.check-added-large-files
: support--enforce-all
withgit-lfs
.check-case-conflict
: improve performance.forbid-new-submodules
: fix false-negatives forpre-push
.check-merge-conflict
: fix execution in git worktrees.- Normalize case of hook names and descriptions.
check-shebang-scripts-are-executable
fix entry point.check-json
: report duplicate keys.no-commit-to-branch
: addmain
to default blocked branches.check-case-conflict
: check conflicts in directory names as well.check-vcs-permalinks
: forbid other branch names.check-shebang-scripts-are-executable
: new hook which ensures shebang'd scripts are executable.check-executables-have-shebangs
: Short circuit shebang lookup on windows.requirements-txt-fixer
: Fix comments which have indentationpretty-format-json
: write to stdout using UTF-8 encoding.- Use more inclusive language.
- Remove deprecated hooks:
flake8
,pyflakes
,autopep8-wrapper
. file-contents-sorter
: Add--unique
argumentcheck-vcs-permalinks
: Add--additional-github-domain
option- New hook:
destroyed-symlinks
to detect unintentional symlink-breakages on windows. file-contents-sorter
: add--ignore-case
option for case-insensitive sortingcheck-added-large-files
: add--enforce-all
option to check non-added files as wellfix-byte-order-marker
: new hook which fixes UTF-8 byte-order marker.check-byte-order-marker
is now deprecated forfix-byte-order-marker
pre-commit/pre-commit-hooks (pre-commit/pre-commit-hooks)
v4.6.0
: pre-commit-hooks v4.6.0
Features
requirements-txt-fixer
: remove duplicate packages.- #1014 PR by @vhoulbreque-withings.
- #960 issue @csibe17.
Migrating
fix-encoding-pragma
: deprecated -- will be removed in 5.0.0. use
pyupgrade or some other tool.
v4.5.0
: pre-commit-hooks v4.5.0
Features
requirements-txt-fixer
: also sortconstraints.txt
by default.- #857 PR by @lev-blit.
- #830 issue by @PLPeeters.
debug-statements
: addbpdb
debugger.
Fixes
file-contents-sorter
: fix sorting an empty file.- #944 PR by @RoelAdriaans.
- #935 issue by @paduszyk.
double-quote-string-fixer
: don't rewrite inside f-strings in 3.12+.- #973 PR by @asottile.
- #971 issue by @XuehaiPan.
Migrating
- now requires python >= 3.8.
- #926 PR by @asottile.
- #927 PR by @asottile.
v4.4.0
: pre-commit-hooks v4.4.0
Features
- forbid-submodules: new hook which outright bans submodules.
- #815 PR by @asottile.
- #707 issue by @ChiefGokhlayeh.
v4.3.0
: pre-commit-hooks v4.3.0
Features
check-executables-have-shebangs
: usegit config core.fileMode
to determine if it should querygit
.- #730 PR by @Kurt-von-Laven.
name-tests-test
: add--pytest-test-first
test convention.- #779 PR by @asottile.
Fixes
check-shebang-scripts-are-executable
: update windows instructions.- #774 PR by @mdeweerd.
- #770 issue by @mdeweerd.
check-toml
: use stdlibtomllib
when available.- #771 PR by @DanielNoord.
- #755 issue by @sognetic.
check-added-large-files
: don't run on non-filestages
.- #778 PR by @asottile.
- #777 issue by @skyj.
v4.2.0
: pre-commit-hooks v4.2.0
Features
name-tests-test
: updated display text.- #713 PR by @asottile.
check-docstring-first
: make output more parsable.- #748 PR by @asottile.
check-merge-conflict
: make output more parsable.- #748 PR by @asottile.
debug-statements
: make output more parsable.- #748 PR by @asottile.
Fixes
check-merge-conflict
: fix detection of======
conflict marker on windows.- #748 PR by @asottile.
Updating
- Drop python<3.7.
- #719 PR by @asottile.
- Changed default branch from
master
tomain
.- #744 PR by @asottile.
v4.1.0
: pre-commit-hooks v4.1.0
Features
debug-statements
: addpdbr
debugger.- #614 PR by @cansarigol.
detect-private-key
: add detection for additional key types.check-executables-have-shebangs
: improve messaging on windows.- #689 PR by @pujitm.
- #686 issue by @jmerdich.
check-added-large-files
: support--enforce-all
withgit-lfs
.- #674 PR by @amartani.
- #560 issue by @jeremy-coulon.
Fixes
check-case-conflict
: improve performance.- #626 PR by @guykisel.
- #625 issue by @guykisel.
forbid-new-submodules
: fix false-negatives forpre-push
.- #619 PR by @m-khvoinitsky.
- #609 issue by @m-khvoinitsky.
check-merge-conflict
: fix execution in git worktrees.- #662 PR by @errsyn.
- #638 issue by @daschuer.
Misc.
- Normalize case of hook names and descriptions.
- #671 PR by @dennisroche.
- #673 PR by @revolter.
v4.0.1
: pre-commit-hooks v4.0.1
Fixes
check-shebang-scripts-are-executable
fix entry point.- #602 issue by @Person-93.
- #603 PR by @scop.
v4.0.0
: pre-commit-hooks v4.0.0
Features
check-json
: report duplicate keys.- #558 PR by @AdityaKhursale.
- #554 issue by @adamchainz.
no-commit-to-branch
: addmain
to default blocked branches.- #565 PR by @ndevenish.
check-case-conflict
: check conflicts in directory names as well.- #575 PR by @slsyy.
- #70 issue by @andyjack.
check-vcs-permalinks
: forbid other branch names.- #582 PR by @jack1142.
- #581 issue by @jack1142.
check-shebang-scripts-are-executable
: new hook which ensures shebang'd scripts are executable.
Fixes
check-executables-have-shebangs
: Short circuit shebang lookup on windows.requirements-txt-fixer
: Fix comments which have indentation- #549 PR by @greshilov.
- #548 issue by @greshilov.
pretty-format-json
: write to stdout using UTF-8 encoding.- #571 PR by @jack1142.
- #570 issue by @jack1142.
- Use more inclusive language.
- #599 PR by @asottile.
Breaking changes
- Remove deprecated hooks:
flake8
,pyflakes
,autopep8-wrapper
.- #597 PR by @asottile.
v3.4.0
: pre-commit-hooks v3.4.0
Features
file-contents-sorter
: Add--unique
argument- #524 PR by @danielhoherd.
check-vcs-permalinks
: Add--additional-github-domain
option- #530 PR by @youngminz.
- New hook:
destroyed-symlinks
to detect unintentional symlink-breakages on windows.- #511 PR by @m-khvoinitsky.
v3.3.0
: pre-commit-hooks v3.3.0
Features
file-contents-sorter
: add--ignore-case
option for case-insensitive sortingcheck-added-large-files
: add--enforce-all
option to check non-added files as well- #519 PR by @mshawcroft.
- #518 issue by @mshawcroft.
fix-byte-order-marker
: new hook which fixes UTF-8 byte-order marker.
Deprecations
check-byte-order-marker
is now deprecated forfix-byte-order-marker
List of commits
4ce6f76 (Update pre-commit hook pre-commit/pre-commit-hooks to v4, 2024-12-30)