-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from Timmmm/user/timh/precommit
Add basic pre-commit config, apply fixes and run it in CI
- Loading branch information
Showing
48 changed files
with
803 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,3 @@ jobs: | |
run: coverage xml | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
# Configure isort to use Black's import style to prevent formatting | ||
# conflicts. As isort and Black may repeatedly reformat the same code, | ||
# causing pre-commit to fail. | ||
args: ["--profile", "black"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.8.0 | ||
hooks: | ||
- id: black | ||
|
||
# TODO: Enable this when lints are fixed. | ||
# - repo: https://github.com/PyCQA/pylint | ||
# rev: v3.3.1 | ||
# hooks: | ||
# - id: pylint | ||
# additional_dependencies: | ||
# - "pyyaml==6.0.2" | ||
|
||
# TODO: Enable this when types are added. | ||
# - repo: https://github.com/RobertCraigie/pyright-python | ||
# rev: v1.1.383 | ||
# hooks: | ||
# - id: pyright | ||
# additional_dependencies: | ||
# - "pyyaml==6.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.