A shareable Ruff starting config designed to get as much as possibly from Ruff quickly.
Project description
Nickineering's Default Ruff Config
A shareable Ruff starting config designed to get as much as possibly from Ruff quickly.
Usage
Install 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.
You probably want to add the output to your .gitignore
so you can rely only on
the package. To do so add the following: nickineering-ruff-base.toml
.
Although it is not required, I recommend creating a Makefile
or other command
runner so that calls to Ruff run both the lint and format commands. An example
Makefile
is below:
configure:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nickineering_ruff_config-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | be7677de1ac2b64e154c3f21a8ae693cd2b858466c72db5739c7e441e2765567 |
|
MD5 | 6b7a64365788467aa8a535dbdf9d3dac |
|
BLAKE2b-256 | b43f3a968da5689191a238c9174cdf9efdf04d41bb9c73862fd290d0715cda4a |
Hashes for nickineering_ruff_config-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c5fe57dcc73a07b202f0ccd54c70843be1e8c1b3d7c9aa2ae3271d0cffda1a |
|
MD5 | c643254a50346fb626da5b3e1026c75f |
|
BLAKE2b-256 | d88e35181935d6b0a083c5fe7fe8928bdd2b4c6e7ea4ef3b02da35ab4406fa3d |