Skip to main content

Preconfigured code formatting and linting.

Project description

plain.code

Preconfigured code formatting and linting.

Overview

The plain code command lints and formats Python files using Ruff, and JavaScript, JSON, and CSS files using Biome. Ruff is installed as a Python dependency, and Biome is managed automatically as a standalone binary (npm is not required).

The most used command is plain code fix, which can be run using the alias plain fix:

plain fix

This will automatically fix linting issues and format your code according to the configured rules.

If plain.dev is installed then plain code check will be run automatically as a part of plain precommit to help catch issues before they are committed.

Configuration

Default configuration is provided by ruff_defaults.toml and biome_defaults.json.

You can customize the behavior in your pyproject.toml:

[tool.plain.code]
exclude = ["path/to/exclude"]

[tool.plain.code.biome]
enabled = true  # Set to false to disable Biome
version = "1.5.3"  # Pin to a specific version

For more advanced configuration options, see get_code_config.

Generally it's expected that you won't change the configuration! We've tried to pick defaults that "just work" for most projects. If you find yourself needing to customize things, you should probably just move to using the tools themselves directly instead of the plain.code package.

Installation

Install the plain.code package from PyPI:

uv add plain.code

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

plain_code-0.9.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

plain_code-0.9.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file plain_code-0.9.2.tar.gz.

File metadata

  • Download URL: plain_code-0.9.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for plain_code-0.9.2.tar.gz
Algorithm Hash digest
SHA256 03445d65706032a7815964838e33d2c0ad0607b31839b38ddeeb1a94a0fe0d66
MD5 ef824fc5f21fc407ce3f2b0a61f816ae
BLAKE2b-256 918e244b2490bce972caeed582658013dbb519e990dc2cf002680b6d840859fc

See more details on using hashes here.

File details

Details for the file plain_code-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: plain_code-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for plain_code-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a88e5b81bf5cf13ff98e6a15e4ac861aa7588782a45e5b61f8b2de6301e8e9c
MD5 5e1ecf9fb08b11225ca63f1b8c6a28bb
BLAKE2b-256 9e8c0cd70ec8add7dcf32ba060ba9477d2e23d2657ab42f71c4f8f475dce9b39

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