requirements-txt-fixer
: also remove pkg_resources==...
.check-illegal-windows-names
: new hook!pretty-format-json
: continue processing even if a file has a json error.destroyed-symlinks
: set stages
to [pre-commit, pre-push, manual]
pre-commit>=3.2.0
.stages
.requirements-txt-fixer
: remove duplicate packages.fix-encoding-pragma
: deprecated -- will be removed in 5.0.0. use pyupgrade or some other tool.requirements-txt-fixer
: also sort constraints.txt
by default.debug-statements
: add bpdb
debugger.file-contents-sorter
: fix sorting an empty file.double-quote-string-fixer
: don't rewrite inside f-strings in 3.12+.forbid-submodules
: new hook which outright bans submodules.check-executables-have-shebangs
: use git config core.fileMode
to determine if it should query git
.name-tests-test
: add --pytest-test-first
test convention.check-shebang-scripts-are-executable
: update windows instructions.check-toml
: use stdlib tomllib
when available.check-added-large-files
: don't run on non-file stages
.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.master
to main
.debug-statements
: add pdbr
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
with git-lfs
.check-case-conflict
: improve performance.forbid-new-submodules
: fix false-negatives for pre-push
.check-merge-conflict
: fix execution in git worktrees.check-shebang-scripts-are-executable
fix entry point.check-json
: report duplicate keys.no-commit-to-branch
: add main
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.flake8
, pyflakes
, autopep8-wrapper
.file-contents-sorter
: Add --unique
argumentcheck-vcs-permalinks
: Add --additional-github-domain
optiondestroyed-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 for fix-byte-order-marker
debug-statements
: add support for pydevd_pycharm
debuggercheck-executables-have-shebangs
: fix git-quoted files on windows (spaces, non-ascii, etc.)check-executables-have-shebangs
: on windows, validate the mode bits using git
requirements-txt-fixer
: support more operatorspre-commit-hooks-removed
: Fix when removed hooks used args
check-toml
: use UTF-8 encoding to load toml filesdetect-aws-credentials
: skip empty aws keysdebug-statements
: add detection wdb
debuggerrequirements-txt-fixer
: support line continuation for dependenciesdetect-aws-credentials
: fix UnicodeDecodeError
when running on non-UTF8 files.pre-commit/pre-commit-hooks now requires python3.6.1+
flake8
/ pyflakes
have been removed, use flake8
from pycqa/flake8
instead:
- repo: https://gitlab.com/pycqa/flake8 rev: 3.8.1 hooks: - id: flake8
egg=...
Use flake8
from pycqa/flake8
instead:
- repo: https://gitlab.com/pycqa/flake8 rev: 3.7.9 hooks: - id: flake8
pretty-format-json
when run without --autofix
.--chars
option to trailing-whitespace
fixer to control which characters are stripped instead of all whitespace.requirements-txt-fixer
when file does not end in a newline.pretty-format-json
.rpdb
to detected debuggers in debug-statements
check-toml
hook__main__
block to pre_commit.file_contents_sorter
so it can be invoked using python -m
git-lfs
tests in azure pipelinesdouble-quote-string-fixer
fix-encoding-pragma
pyyaml
to ruamel.yaml
--pattern
option to no-commit-to-branch
for regex matching branch names.require_serial: true
for flake8check-executables-have-shebangs
/ trailing-whitespace
hooks during the commit-msg
stage.check-byte-order-marker
against types: [text]
check-docstring-first
pre-commit-hooks
now is type checked with mypy.detect-private-key
mixed-line-endings
end-of-file-fixer
detect-aws-credentials
autopep8-wrapper
is deprecated in descriptionautopep8-wrapper
has been moved to pre-commit/mirrors-autopep8trailing-whitespace
defaults to --no-markdown-linebreak-ext
hooks.yaml
(legacy pre-commit hook metadata) deletedtypes
compatibility metadata removedno-commit-to-branch
pre-commit
is now 0.15.0autopep8
from pre-commit/mirrors-autopep8trailing-whitespace
use args: [--markdown-linebreak-ext=md,markdown]
(the previous default value)(Note: this is a tag-only release as no code changes occurred)
end-of-file-fixer
during commit-msg
stageno-commit-to-branch
: allow --branch
to be specified multiple timescheck-merge-conflict
: add --assume-in-merge
to force checks outside of a merge commit situationResourcesWarning
s--unsafe
argument to check-yaml
to allow custom yaml tagspkg-resources==0.0.0
in requirements-txt-fixer
breakpoint()
(python3.7+) in debug-statements
hook.detect-private-key
autopep8-wrapper
, check-docstring-first
, double-quote-string-fixer
)AttributeError
in check-builtin-literals
for some functionstrailing-whitespace
entrypoint was incorrect.trailing-whitespace
no longer adds a missing newline at end-of-file(Note: this is a tag-only release as no code changes occurred)
no-commit-to-branch
detect-aws-credentials
false positive when key was emptyno-commit-to-branch
no longer crashes when not on a branchcheck-builtin-literals
hook.pretty-format-json
no longer depends on simplejson
.detect-private-key
now detects gcp keys.check-vcs-permalinks
under python3.check-yaml
gains a --allow-multiple-documents
(-m
) argument to allow linting of files using the multi document syntaxcheck-vcs-permalinks
for ensuring permalinked github urls.trailing-whitespace
for non-utf8 files on macosrequirements-txt-fixer
for files ending in comments--fix=...
when whole file is a different endingmixed-line-ending
mixed-line-ending
check-ast
.name-tests-test
git-lfs
for check-added-large-files
. The oldest version that is supported is 2.2.1 (2.2.0 will incorrectly refer to all files as “lfs” (false negative) and earlier versions will crash.debug-statements
now works for non-utf-8 files.check-executables-have-shebangs
hook.sort-simple-yaml
hookrequirements-txt-fixer
for empty filesfile-contents-sorter
hook for sorting flat filescheck-merge-conflict
now recognizes rebase conflictstypes
(and therefore requires pre-commit 0.15.0). This allows the text processing hooks to match all text files (and to match files which would only be classifiable by their shebangs).detect-aws-credentials
tests.py
in name-tests-test
--no-ensure-ascii
option to pretty-format-json
no-commit-to-branch
hook