-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
543 additions
and
280 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 |
---|---|---|
@@ -0,0 +1,140 @@ | ||
default_language_version: | ||
python: python3 | ||
fail_fast: true | ||
|
||
exclude: | | ||
(?x)^( | ||
.*?src/.* | | ||
.*?/migrations/.* | | ||
.*?/?__pycache__/.* | | ||
.git/.* | | ||
.mypy_cache/.* | | ||
.pytest_cache/.* | | ||
.tox/.* | | ||
.venv/.* | | ||
.vscode/.* | | ||
node_modules/.* | | ||
fh_app_template/.* | | ||
.*?/*.yml | | ||
.*?/*.yaml | | ||
.*?/*.cfg | | ||
.*?/*.toml | ||
)$ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.17.0 | ||
hooks: | ||
- id: pyupgrade | ||
stages: [commit] | ||
name: "✅ Python Upgrade" | ||
args: | ||
- "--py38-plus" | ||
- "--py39-plus" | ||
- "--py310-plus" | ||
- "--py311-plus" | ||
- repo: https://github.com/adamchainz/django-upgrade | ||
rev: 1.21.0 # replace with latest tag on GitHub | ||
hooks: | ||
- id: django-upgrade | ||
stages: [commit] | ||
name: "✅ Django Upgrade" | ||
args: [--target-version, "4.2"] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 # Use the ref you want to point at | ||
hooks: | ||
- id: check-merge-conflict | ||
name: "✅ Checking Merge Conflict" | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
stages: [commit] | ||
name: "✅ Black Reformatting" | ||
exclude: ^.*\b(migrations)\b.*$ | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.3.1 | ||
hooks: | ||
- id: autoflake | ||
stages: [commit] | ||
name: "✅ Autoflake Reformatting" | ||
language: python | ||
"types": [python] | ||
require_serial: true | ||
exclude: | | ||
(?x)( | ||
.*?/migrations/.* | ||
) | ||
entry: autoflake | ||
args: | ||
- "--ignore-init-module-imports" | ||
- "--remove-all-unused-imports" | ||
- "--in-place" | ||
- "--remove-unused-variables" | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
stages: [commit] | ||
name: "✅ Flake8 Validation" | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
stages: [commit] | ||
name: "✅ Isort Validation" | ||
- repo: local | ||
hooks: | ||
- id: mypy | ||
stages: [commit] | ||
name: "✅ Mypy Validation" | ||
entry: mypy | ||
language: python | ||
types: [python] | ||
args: | ||
[ | ||
"--install-types", | ||
"--no-namespace-packages", | ||
"--non-interactive", | ||
"--python-executable", | ||
"venv/bin/python", | ||
] | ||
additional_dependencies: ["mypy~=0.931"] | ||
- repo: local | ||
hooks: | ||
- id: django-check | ||
name: "✅ Django Check" | ||
entry: python manage.py check | ||
always_run: true | ||
verbose: false | ||
pass_filenames: false | ||
language: system | ||
- repo: https://github.com/frankhood/pre-commit-hooks-django-migrations | ||
rev: 0.1.5 | ||
hooks: | ||
- id: makemigrations-check-absent | ||
name: "✅ Check for absent migrations" | ||
- repo: https://github.com/ecugol/pre-commit-hooks-django | ||
rev: v0.4.0 | ||
hooks: | ||
- id: check-unapplied-migrations | ||
name: "✅ Check for unapplied migrations" | ||
entry: python manage.py migrate --check | ||
- id: check-untracked-migrations | ||
name: "✅ Check for untracked migrations" | ||
# - repo: https://github.com/frankhood/pre-commit-dotenv-checker | ||
# rev: 0.1.3 | ||
# hooks: | ||
# - id: check-dotenv | ||
# name: "✅ Check diff from .env to .env_template" | ||
# args: ["--from-file", ".env", "--to-file", ".env_template"] | ||
- repo: local | ||
hooks: | ||
- id: django-test | ||
stages: [commit] | ||
name: "✅ Django Testing" | ||
entry: python manage.py test --no-input | ||
always_run: true | ||
verbose: true | ||
pass_filenames: false | ||
language: system |
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,4 +1 @@ | ||
3.6.5 | ||
3.7.9 | ||
3.8.9 | ||
3.9.4 | ||
3.11 |
Oops, something went wrong.