Skip to content

Commit

Permalink
enhance: Cleaned up pre-commits, removed blocking ones (#395)
Browse files Browse the repository at this point in the history
* enhance: Cleaned up pre-commits, removed blocking ones

* enhance: Cleaned up pre-commits

* refactor: removed trailing whitespace

---------

Signed-off-by: Trey <[email protected]>
  • Loading branch information
TreyWW authored May 30, 2024
1 parent d3017ec commit 9a4ce3f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
64 changes: 43 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,65 @@ repos:
entry: black --check --diff
hooks:
- id: black
name: Black Formatter
files: .
language: python
types: [ python ]
- repo: local
hooks:
- id: pre-commit-django-migrations
name: Check django migrations
entry: python manage.py makemigrations --dry-run --check --no-input
language: system
types: [ python ]
files: ./backend/models.py
pass_filenames: false
- repo: local
hooks:
- id: pre-commit-djlint
name: Djlint (html files)
entry: djlint . --profile django --check
entry: djlint ./frontend/templates/ --profile django --reformat
language: system
types: [ python ]
files: ./frontend/templates/
types: [ html ]
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
types: [ text ]
language: python
- id: end-of-file-fixer
- id: debug-statements
- id: name-tests-test
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [ --py39-plus ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
args:
- --explicit-package-bases
- --no-incremental
additional_dependencies: ['mypy >=1.7.0, <1.8.0']
types: [ python ]
language: python
- id: detect-aws-credentials
- id: detect-private-key
exclude: "docs/getting-started/settings/AWS/static.md"
- id: check-added-large-files
- id: check-ast
types: [ python3 ]
language: python
files: ".*\\.py$" # may not be needed due to type of python3
- id: check-json
types: [ json ]
files: ".*\\.json$"
exclude: "backend/management/commands/contributors.json"
# - id: debug-statements # (unknown use)
# - id: name-tests-test # (blocking)
# - repo: https://github.com/asottile/setup-cfg-fmt
# rev: v2.5.0
# hooks:
# - id: setup-cfg-fmt
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.2
# hooks:
# - id: pyupgrade # (blocking)
# args: [ --py39-plus ]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.7.0
# hooks:
# - id: mypy # (blocking)
# args:
# - --explicit-package-bases
# - --no-incremental
# additional_dependencies: ['mypy >=1.7.0, <1.8.0']
4 changes: 2 additions & 2 deletions backend/views/core/auth/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def resend_verification_code(request):
subject="Verify your email",
message=f"""
Hi {user.first_name if user.first_name else "User"},
Verification for your email has been requested to link this email to your MyFinances account.
If this wasn't you, you can simply ignore this email.
If it was you, you can complete the verification by clicking the link below.
Verify Link: {magic_link_url}
""",
Expand Down

0 comments on commit 9a4ce3f

Please sign in to comment.