Make sure the title is descriptive of what the PR includes. Don't mention issue names/numbers; save that for the description.
List the names of those who contributed to the project.
@simojo
Link the issue the pull request is meant to fix/resolve.
Closes #29
Describe the contents and goal of the pull request.
This PR adds pre-commit hooks. By running poetry run task pre-commit-install, a developer can easily configure pre-commit hooks to be installed for their system. The pre-commit commands are defined in .pre-commit-config.yaml, which I will put here:
# configuring pre-commit hooks for chasten.
# this ensures users do not commit problematic code
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
files: '\.py$'
- id: check-case-conflict
- id: check-merge-conflict
- id: forbid-submodules
- id: trailing-whitespace
- repo: local
hooks:
- id: fix-linting
files: '\.py$'
name: Fix Linting
entry: poetry run task lint --fix
language: system
Will coverge be maintained/increased?
This does not affect coverage.
What operating systems has this been tested on? How were these tests conducted?
This has been tested in NixOS 22.11.2301.cff83d5032a
Include a code block and/or screenshots displaying the functionality of your feature, if applicable/possible.
Initializing pre-commits via poetry
$ poetry run task pre-commit-install
The currently activated Python version 3.10.12 is not supported by the project (^3.11).
Trying to find and use a compatible version.
Using python3.11 (3.11.4)
pre-commit installed at .git/hooks/pre-commit
New commit behavior
$ touch deleteme
$ git add deleteme
$ git commit -m 'total nonsense'
check python ast.....................................(no files to check)Skipped
check for case conflicts.................................................Passed
check for merge conflicts................................................Passed
forbid submodules....................................(no files to check)Skipped
trim trailing whitespace.................................................Passed
Fix Linting..............................................................Passed
[pre-commit 1090e48] total nonsense
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 deleteme
Make sure the title is descriptive of what the PR includes. Don't mention issue names/numbers; save that for the description.
List the names of those who contributed to the project. @simojo
Link the issue the pull request is meant to fix/resolve. Closes #29
Describe the contents and goal of the pull request. This PR adds pre-commit hooks. By running
poetry run task pre-commit-install
, a developer can easily configure pre-commit hooks to be installed for their system. The pre-commit commands are defined in.pre-commit-config.yaml
, which I will put here:Will coverge be maintained/increased? This does not affect coverage.
What operating systems has this been tested on? How were these tests conducted? This has been tested in
NixOS 22.11.2301.cff83d5032a
Include a code block and/or screenshots displaying the functionality of your feature, if applicable/possible.
Initializing pre-commits via poetry
New commit behavior
@laurennevill @bergasanargya @gkapfham