Skip to main content

Formatting library for Forge

Project description

forge-format

A unified, opinionated code formatting command for Django projects.

Uses black and ruff to format Python code.

Installation

First, install forge-format from PyPI:

pip install forge-format

Now you will have access to the format command:

forge format

Note that if you're using black + ruff for the first time, a common issue is to get a bunch of E501 Line too long errors on code comments. This is because black doesn't fix line lengths on comments! If there are more than you want to fix, just add this to your pyproject.toml:

[tool.ruff]
# Never enforce `E501` (line length violations).
ignore = ["E501"]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forge_format-1.1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

forge_format-1.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page