Skip to content

Commit

Permalink
Merge branch 'release/0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
APalhood committed Oct 9, 2024
2 parents b758f53 + ec15ea0 commit 9c25813
Show file tree
Hide file tree
Showing 20 changed files with 543 additions and 280 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.py[cod]
__pycache__
.mypy_cache
*pyvenv*
venv

# C extensions
*.so
Expand Down Expand Up @@ -48,4 +51,4 @@ docs/_build

.coverage
.tox
.python-version
.python-version
140 changes: 140 additions & 0 deletions .pre-commit-config.yaml
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
5 changes: 1 addition & 4 deletions .python-version
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
Loading

0 comments on commit 9c25813

Please sign in to comment.