Skip to content

Commit

Permalink
⚙️ Adds pre-commit and lint just command
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Triplett committed Sep 28, 2023
1 parent 9a8b6b2 commit 66bfc53
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
alias: autoformat
- id: trailing-whitespace
alias: autoformat
- repo: https://github.com/asottile/pyupgrade
rev: v3.13.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
args: [
"."
]
alias: autoformat
additional_dependencies: ['click==8.0.4']
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
alias: autoformat
additional_dependencies: ['black==22.1.0', 'click==8.0.4']
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.291'
hooks:
- id: ruff
# Respect `exclude` and `extend-exclude` settings.
args:
- "--fix"
exclude: /migrations/
alias: autoformat
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
--session "test_django_version" \
--session "test_python_version" \
{{ ARGS }}

lint:
python -m nox --reuse-existing-virtualenvs --session "lint"

0 comments on commit 66bfc53

Please sign in to comment.