plain.code 0.9.1__tar.gz → 0.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.code
3
- Version: 0.9.1
4
- Summary: Code formatting and linting for Plain.
3
+ Version: 0.9.2
4
+ Summary: Preconfigured code formatting and linting.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
7
7
  Requires-Python: >=3.11
@@ -15,9 +15,21 @@ Description-Content-Type: text/markdown
15
15
 
16
16
  **Preconfigured code formatting and linting.**
17
17
 
18
+ - [Overview](#overview)
19
+ - [Configuration](#configuration)
20
+ - [Installation](#installation)
21
+
22
+ ## Overview
23
+
18
24
  The `plain code` command lints and formats Python files using [Ruff](https://astral.sh/ruff), and JavaScript, JSON, and CSS files using [Biome](https://biomejs.dev/). Ruff is installed as a Python dependency, and Biome is managed automatically as a standalone binary (npm is not required).
19
25
 
20
- The most used command is `plain code fix`, which can be run using the alias `plain fix`.
26
+ The most used command is `plain code fix`, which can be run using the alias `plain fix`:
27
+
28
+ ```bash
29
+ plain fix
30
+ ```
31
+
32
+ This will automatically fix linting issues and format your code according to the configured rules.
21
33
 
22
34
  ![](https://assets.plainframework.com/docs/plain-fix.png)
23
35
 
@@ -25,6 +37,27 @@ If [`plain.dev`](/plain-dev/README.md) is installed then `plain code check` will
25
37
 
26
38
  ## Configuration
27
39
 
28
- Default configuration is provided by [`ruff_defaults.toml`](plain/code/ruff_defaults.toml) and [`biome_defaults.json`](plain/code/biome_defaults.json).
40
+ Default configuration is provided by [`ruff_defaults.toml`](./ruff_defaults.toml) and [`biome_defaults.json`](./biome_defaults.json).
41
+
42
+ You can customize the behavior in your `pyproject.toml`:
43
+
44
+ ```toml
45
+ [tool.plain.code]
46
+ exclude = ["path/to/exclude"]
47
+
48
+ [tool.plain.code.biome]
49
+ enabled = true # Set to false to disable Biome
50
+ version = "1.5.3" # Pin to a specific version
51
+ ```
52
+
53
+ For more advanced configuration options, see [`get_code_config`](./cli.py#get_code_config).
29
54
 
30
55
  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.
56
+
57
+ ## Installation
58
+
59
+ Install the `plain.code` package from [PyPI](https://pypi.org/project/plain.code/):
60
+
61
+ ```bash
62
+ uv add plain.code
63
+ ```
@@ -1,5 +1,16 @@
1
1
  # plain-code changelog
2
2
 
3
+ ## [0.9.2](https://github.com/dropseed/plain/releases/plain-code@0.9.2) (2025-07-30)
4
+
5
+ ### What's changed
6
+
7
+ - Skip Biome installation and updates when Biome is disabled in configuration ([b8beb5c](https://github.com/dropseed/plain/commit/b8beb5c))
8
+ - Enhanced README with better structure, usage examples, and configuration documentation ([4ebecd1](https://github.com/dropseed/plain/commit/4ebecd1))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - No changes required
13
+
3
14
  ## [0.9.1](https://github.com/dropseed/plain/releases/plain-code@0.9.1) (2025-07-18)
4
15
 
5
16
  ### What's changed
@@ -2,9 +2,21 @@
2
2
 
3
3
  **Preconfigured code formatting and linting.**
4
4
 
5
+ - [Overview](#overview)
6
+ - [Configuration](#configuration)
7
+ - [Installation](#installation)
8
+
9
+ ## Overview
10
+
5
11
  The `plain code` command lints and formats Python files using [Ruff](https://astral.sh/ruff), and JavaScript, JSON, and CSS files using [Biome](https://biomejs.dev/). Ruff is installed as a Python dependency, and Biome is managed automatically as a standalone binary (npm is not required).
6
12
 
7
- The most used command is `plain code fix`, which can be run using the alias `plain fix`.
13
+ The most used command is `plain code fix`, which can be run using the alias `plain fix`:
14
+
15
+ ```bash
16
+ plain fix
17
+ ```
18
+
19
+ This will automatically fix linting issues and format your code according to the configured rules.
8
20
 
9
21
  ![](https://assets.plainframework.com/docs/plain-fix.png)
10
22
 
@@ -12,6 +24,27 @@ If [`plain.dev`](/plain-dev/README.md) is installed then `plain code check` will
12
24
 
13
25
  ## Configuration
14
26
 
15
- Default configuration is provided by [`ruff_defaults.toml`](plain/code/ruff_defaults.toml) and [`biome_defaults.json`](plain/code/biome_defaults.json).
27
+ Default configuration is provided by [`ruff_defaults.toml`](./ruff_defaults.toml) and [`biome_defaults.json`](./biome_defaults.json).
28
+
29
+ You can customize the behavior in your `pyproject.toml`:
30
+
31
+ ```toml
32
+ [tool.plain.code]
33
+ exclude = ["path/to/exclude"]
34
+
35
+ [tool.plain.code.biome]
36
+ enabled = true # Set to false to disable Biome
37
+ version = "1.5.3" # Pin to a specific version
38
+ ```
39
+
40
+ For more advanced configuration options, see [`get_code_config`](./cli.py#get_code_config).
16
41
 
17
42
  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.
43
+
44
+ ## Installation
45
+
46
+ Install the `plain.code` package from [PyPI](https://pypi.org/project/plain.code/):
47
+
48
+ ```bash
49
+ uv add plain.code
50
+ ```
@@ -25,10 +25,16 @@ def cli():
25
25
  @click.pass_context
26
26
  def install(ctx, force):
27
27
  """Install or update the Biome standalone per configuration."""
28
+ config = get_code_config()
29
+
30
+ if not config.get("biome", {}).get("enabled", True):
31
+ click.secho("Biome is disabled in configuration", fg="yellow")
32
+ return
33
+
28
34
  biome = Biome()
29
35
 
30
36
  if force or not biome.is_installed() or biome.needs_update():
31
- version_to_install = get_code_config().get("biome", {}).get("version", "")
37
+ version_to_install = config.get("biome", {}).get("version", "")
32
38
  if version_to_install:
33
39
  click.secho(
34
40
  f"Installing Biome standalone version {version_to_install}...",
@@ -46,6 +52,12 @@ def install(ctx, force):
46
52
  @cli.command()
47
53
  def update():
48
54
  """Update the Biome standalone binary to the latest release."""
55
+ config = get_code_config()
56
+
57
+ if not config.get("biome", {}).get("enabled", True):
58
+ click.secho("Biome is disabled in configuration", fg="yellow")
59
+ return
60
+
49
61
  biome = Biome()
50
62
  click.secho("Updating Biome standalone...", bold=True)
51
63
  version = biome.install()
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "plain.code"
3
- version = "0.9.1"
4
- description = "Code formatting and linting for Plain."
3
+ version = "0.9.2"
4
+ description = "Preconfigured code formatting and linting."
5
5
  authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11"
File without changes
File without changes
File without changes