Skip to content

Instantly share code, notes, and snippets.

@ledil
Last active November 21, 2024 16:05
Show Gist options
  • Save ledil/3f39cbac3a4698127dcc108a7abf0c88 to your computer and use it in GitHub Desktop.
Save ledil/3f39cbac3a4698127dcc108a7abf0c88 to your computer and use it in GitHub Desktop.
django boilerplate
default_language_version:
python: python3.10
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
- repo: https://github.com/ecugol/pre-commit-hooks-django
rev: v0.4.0 # Use the ref you want to point at
hooks:
- id: check-untracked-migrations
- id: check-unapplied-migrations
- id: check-absent-migrations
# args: [ "--add-location", "file" ]
- repo: https://github.com/JelleZijlstra/autotyping
rev: 24.9.0
hooks:
- id: autotyping
stages: [commit]
types: [python]
args: [--safe]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
hooks:
# Run the linter.
- id: ruff
# - repo: local
# hooks:
# - id: check-outdated-packages
# name: Check for outdated packages
# entry: ./check_outdated_packages.sh
# language: script
# always_run: true
# verbose: true
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports
- flake8-typing-imports
# - repo: https://github.com/asottile/reorder_python_imports
# rev: v3.3.0
# hooks:
# - id: reorder-python-imports
- repo: https://github.com/ambv/black
rev: '24.10.0'
hooks:
- id: black
- repo: https://github.com/PyCQA/bandit
rev: '1.7.10'
hooks:
- id: bandit
args: [ "-x", "tests" ]
stages: [ push ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1900']
# - id: check-docstring-first
- id: debug-statements
# - id: end-of-file-fixer
# - id: trailing-whitespace
# - id: check-ast
# - id: check-builtin-literals
- id: detect-private-key
# - id: mixed-line-ending
# - id: name-tests-test
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v1.1.1'
# hooks:
# - id: mypy
# exclude: "[a-zA-Z]*/[a-zA-Z]*/(migrations)/(.)*"
# additional_dependencies: [
# 'tokenize-rt',
# 'djangorestframework',
# 'django',
# 'djangorestframework-stubs',
# 'django-stubs',
# ]
# args: [--config=setup.cfg, --no-strict-optional, --ignore-missing-imports]
cython
ujson
requests
raven
requests-mock
djangorestframework
coreapi
django-cors-headers
django-extensions
django-filter
flake8
flake8-bugbear
django
django_compressor
csscompressor
psycopg2-binary
django-finalware
django-extensions
django-cotton
ipython
pip-tools
bandit
django-allauth
Pillow
django-imagekit
django-dbbackup
django-htmx
pyyaml
dacite
huey
redis
gevent
django-huey
django-allauth-theme
marshmallow-dataclass
fastapi
uvicorn[standard]
starlette
sse-starlette
databases[asyncpg]
fastapi-plugins[all]
gunicorn
django-redis
google-api-python-client
google-auth-httplib2
google-auth-oauthlib
python3-openid
pyjwt
python3-saml
django-compressor
py-mini-racer
beautifulsoup4
python-dateutil
lxml
dj-database-url
django-huey-monitor
borb
requests-hawk
tenacity
selectolax
django-timezone-field
django-silk
ruff
cerberus
pyupgrade
pre-commit
djangorestframework-stubs[compatible-mypy]
django-stubs[compatible-mypy]
tokenize-rt
coverage
Werkzeug
pip-audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment