-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update pre-commit hook versions, align mypy config with pyprojec…
…t.toml, remove flakehell and add flakeheaven
- Loading branch information
Showing
3 changed files
with
22 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,38 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/ambv/black | ||
rev: 21.12b0 | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.910-1 | ||
rev: v0.910 | ||
hooks: | ||
- name: Run mypy static analysis tool | ||
id: mypy | ||
args: [--no-warn-unused-ignores, --ignore-missing-imports] | ||
files: src | ||
- repo: https://github.com/flakehell/flakehell/ | ||
rev: v.0.9.0 | ||
additional_dependencies: | ||
- pydantic | ||
args: | ||
- --no-warn-unused-ignores | ||
- --ignore-missing-imports | ||
# Only in this pre-commit hook, it is necessary to set this argument, it is working as intended in the normal `pdm run mypy` run: | ||
# mypy doesn't pick up the pyproject.toml configuration in the pre-commit hook, which already has this option enabled | ||
- --allow-untyped-decorators | ||
# Only in this pre-commit hook, it is working as intended in the normal `pdm run mypy` run: | ||
# mypy doesn't recognize the ConfigSchema type and gives the error | ||
# Class cannot subclass "ConfigSchema" (has type "Any") | ||
- --allow-subclassing-any | ||
- repo: https://github.com/flakeheaven/flakeheaven | ||
rev: 0.11.1 | ||
hooks: | ||
- name: Run flakehell static analysis tool | ||
id: flakehell | ||
- name: Run flakeheaven static analysis tool | ||
id: flakeheaven |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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