Skip to main content

A shareable Ruff starting config designed to get as much as possibly from Ruff quickly.

Project description

Nickineering's Default Ruff Config

PyPI - Version

A shareable Ruff starting config designed to get as much as possibly from Ruff quickly.

Usage

pip install ruff nickineering-ruff-config

Pip install this package, Ruff, and create a ruff.toml or another Ruff supported configuration file in your project root. Inside that file extend this config like so:

extend = "nickineering-ruff-base.toml"

# Override these settings, or add your own here

# For example:

[format]
docstring-code-format = false

You will also need to create a script to copy the file, since Ruff does not support extending from a package. This is a Poetry script which does that as an example:

[tool.poetry.scripts]
update-ruff-base = "nickineering_ruff_config:update_ruff_base"

You could then run it with poetry run update-ruff-base. This would need to be re-run to install new versions of this package.

Finally, add the output to your .gitignore so you can rely only on the package.

# Automatically updated configuration file from nickineering-ruff-config
nickineering-ruff-base.toml

It is also recommended to create a Makefile or other command runner to document that the update-ruff-base command must be run when installing the project and so that calls to Ruff run both the lint and format commands. An example Makefile is below:

setup:
    poetry install
    poetry run update-ruff-base

lint:
    ruff format
    ruff check --fix

Publishing

A Github Action is automatically run deploying this code to PyPi when a new release is published in Github.

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

nickineering_ruff_config-2.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nickineering_ruff_config-2.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file nickineering_ruff_config-2.0.1.tar.gz.

File metadata

File hashes

Hashes for nickineering_ruff_config-2.0.1.tar.gz
Algorithm Hash digest
SHA256 b4e4b5744174bb9bf09f790d6dee75bd6ce1250d4002e98620b01df455955c62
MD5 9b8c226efa6c4b7363c170a883c860f7
BLAKE2b-256 db6fcd7efbc2e38c521e1a421bd751a3da63382c092bc746e7c2a4647d1b6c2f

See more details on using hashes here.

File details

Details for the file nickineering_ruff_config-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nickineering_ruff_config-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7e65b42689bb55d52140c90e3817996546ba0e81e12239b4b2a925895d39d49
MD5 a3d2123747232d2dd613ac608b588d9d
BLAKE2b-256 03f2abef18f2c91c43c4a5cfc2240e2790d319e5836b6d5945a10327ba8782be

See more details on using hashes here.

Supported by

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