Skip to content

Commit

Permalink
Update pre-commit config.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Sep 14, 2021
1 parent 78d71a9 commit 59d1953
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 30 deletions.
32 changes: 21 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---

exclude: ^.*\._py$
exclude: ^repo_helper/templates/.*\.(_py|yml)$

repos:
- repo: https://github.com/repo-helper/pyproject-parser
rev: v0.4.2
hooks:
- id: reformat-pyproject

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -15,9 +20,7 @@ repos:
- id: check-executables-have-shebangs
- id: check-json
- id: check-toml
exclude: ^repo_helper/templates/.*\.toml$
- id: check-yaml
exclude: ^repo_helper/templates/.*\.(yml|yaml)$
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
Expand All @@ -33,7 +36,7 @@ repos:
args:
- --allow-git
- id: check-docstring-first
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup|tests/.*)\.py$
exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$
- id: bind-requirements

- repo: https://github.com/domdfcoding/flake8-dunder-all
Expand All @@ -43,10 +46,9 @@ repos:
files: ^repo_helper/.*\.py$

- repo: https://github.com/domdfcoding/flake2lint
rev: v0.4.0
rev: v0.4.1
hooks:
- id: flake2lint
files: ^(?!repo_helper/files/linting\.py).*$

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.8.0
Expand All @@ -57,27 +59,35 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/asottile/pyupgrade
rev: v2.18.2
rev: v2.12.0
hooks:
- id: pyupgrade
args:
- --py36-plus
- --keep-runtime-typing

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
hooks:
- id: remove-crlf
- id: forbid-crlf

- repo: https://github.com/repo-helper/formate
rev: v0.4.5
- repo: https://github.com/python-formate/snippet-fmt
rev: v0.1.0
hooks:
- id: snippet-fmt

- repo: https://github.com/python-formate/formate
rev: v0.4.9
hooks:
- id: formate
exclude: ^(repo_helper/templates/.*|doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.(_)?py$
exclude: ^(repo_helper/templates/.*|doc-source/conf|__pkginfo__|setup)\.(_)?py$

- repo: https://github.com/domdfcoding/dep_checker
rev: v0.6.2
hooks:
- id: dep_checker
args:
- repo_helper

# Custom hooks can be added below this comment
3 changes: 1 addition & 2 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docs_url: https://docs.repo-helper.uk
python_deploy_version: 3.7
min_coverage: 85
tox_testenv_extras: all
pre_commit_exclude: "^.*\\._py$"
pre_commit_exclude: "^repo_helper/templates/.*\\.(_py|yml)$"

additional_ignore:
- Tokens
Expand Down Expand Up @@ -73,7 +73,6 @@ yapf_exclude:
- "repo_helper/templates/.*"

exclude_files:
- pre-commit
- license_rst

extras_require:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def do_test_release(
"keywords = utilities",
])
(temp_repo.path / "repo_helper_demo").maybe_make()
(temp_repo.path / "repo_helper_demo" / "__init__.py").write_text('__version__ = "0.0.1"')
(temp_repo.path / "repo_helper_demo" / "__init__.py").write_clean('__version__ = "0.0.1"')
(temp_repo.path / "README.rst").write_lines([
".. image:: https://img.shields.io/github/commits-since/domdfcoding/repo_helper/v0.0.1",
"\t:target: https://github.com/domdfcoding/repo_helper/pulse",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli/test_release_/test_release_major_init._py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.0"
2 changes: 1 addition & 1 deletion tests/test_cli/test_release_/test_release_minor_init._py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.0"
2 changes: 1 addition & 1 deletion tests/test_cli/test_release_/test_release_patch_init._py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.2"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.2"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.2"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.2"
2 changes: 1 addition & 1 deletion tests/test_cli/test_release_/test_release_version_init._py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.3"
__version__ = "1.2.3"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.3"
__version__ = "1.2.3"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.3"
__version__ = "1.2.3"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.3"
__version__ = "1.2.3"

0 comments on commit 59d1953

Please sign in to comment.