Skip to main content

django-migrations-ruff-formatter

Patches the Django formatter to use ruff, so you don't have to ignore formatting for your migrations.

Installation

Add to your project one way or another

uv add --dev 'django-migrations-ruff-formatter>=0.1.0'

or if you're living under a rock...

pip install django-migrations-ruff-formatter

and in your settings, add this

INSTALLED_APPS = [
    # ...
    'django_migrations_ruff_formatter.apps.RuffFormatter',
]

The patcher just invokes ruff format *migrations and ruff check --fix *migrations. This means it picks up your ruff config from your project.

You can pass extra args to ruff by setting RUFF_EXTRA_FORMAT_ARGS or RUFF_EXTRA_LINT_ARGS in your django settings. For example:

RUFF_EXTRA_FORMAT_ARGS=["--force-exclude"]

Use

Just like before:

uv run ./manage.py makemigrations

Release files for django-migrations-ruff-formatter 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-migrations-ruff-formatter 0.1.3
File Size Uploaded
django_migrations_ruff_formatter-0.1.3.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-migrations-ruff-formatter 0.1.3
File Interpreter ABI Platform
django_migrations_ruff_formatter-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / django_migrations_ruff_formatter-0.1.3.tar.gz

Download URL django_migrations_ruff_formatter-0.1.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c53f9807b3d0386c92c3549057c859dd5eb21c9ac70861d92e37e108839f619c
BLAKE2b-256 checksum
How to use checksums
58aaf592fe85d99b49d657e4544836ba60576477319682590d386bda5a2c55da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release files / django_migrations_ruff_formatter-0.1.3-py3-none-any.whl

Download URL django_migrations_ruff_formatter-0.1.3-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b81152a51e5a50dd9149e4a6bd78793319442b69cb16a9b61b3fab264cf7684
BLAKE2b-256 checksum
How to use checksums
8b33c25c687d1d7ee7001e4b53ffc927fd0ca6b8b21549b85e80e83578cfd7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page