Skip to content

Commit

Permalink
pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C committed Aug 2, 2023
1 parent 05ab61d commit 0736e5d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11']

steps:
- name: Checkout code 🛎️
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -15,7 +15,7 @@ repos:
additional_dependencies:
- mdformat-toc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.0
rev: v1.5.1
hooks:
- id: forbid-crlf
- id: remove-crlf
Expand All @@ -37,14 +37,14 @@ repos:
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.10.1
hooks:
- id: pyupgrade
args:
- --py37-plus
exclude: ^tests/resources/.*
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
exclude: ^tests/resources/
Expand All @@ -54,7 +54,7 @@ repos:
- id: python-bandit-vulnerability-check
args: [--skip, 'B101', --recursive, .]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.4.1
hooks:
- id: mypy
args:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -90,10 +90,10 @@ In case you want to remove the comment headers introduced by

1. Temporarily add the `--remove-header` arg in your
`.pre-commit-config.yaml` ;
1. Run the hook on all your files:
2. Run the hook on all your files:
`pre-commit run insert-license --all-files` ;
1. Remove the `--remove-header` arg and update your `LICENSE.txt` ;
1. Re-run the hook on all your files.
3. Remove the `--remove-header` arg and update your `LICENSE.txt` ;
4. Re-run the hook on all your files.

#### Handling years flexibly

Expand Down Expand Up @@ -351,5 +351,5 @@ form the historical ChangeLog.
### Releasing a new version

1. Bump version in `setup.py` & `README.md`
1. `git commit -nam "New release $version" && git tag $version && git push && git push --tags`
1. Publish a GitHub release.
2. `git commit -nam "New release $version" && git tag $version && git push && git push --tags`
3. Publish a GitHub release.
4 changes: 3 additions & 1 deletion pre_commit_hooks/insert_license.py
Expand Up @@ -104,7 +104,9 @@ def main(argv=None):
if changed_files:
print(f"Some sources were modified by the hook {changed_files}")
if todo_files:
print(f"Some sources {todo_files} contain TODO about inconsistent licenses")
print(
f"Some sources contain TODO about inconsistent licenses: {todo_files}"
)
print("Now aborting the commit.")
print(
'You should check the changes made. Then simply "git add --update ." and re-commit'
Expand Down

0 comments on commit 0736e5d

Please sign in to comment.