plain.code 0.11.2__tar.gz → 0.11.4__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.code
3
- Version: 0.11.2
3
+ Version: 0.11.4
4
4
  Summary: Preconfigured code formatting and linting.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -1,5 +1,26 @@
1
1
  # plain-code changelog
2
2
 
3
+ ## [0.11.4](https://github.com/dropseed/plain/releases/plain-code@0.11.4) (2025-11-17)
4
+
5
+ ### What's changed
6
+
7
+ - The `plain fix` command now displays styled output that matches the format of `plain code check`, showing the tool name in bold and the command being run in dim text ([cde9a8e](https://github.com/dropseed/plain/commit/cde9a8e))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - No changes required
12
+
13
+ ## [0.11.3](https://github.com/dropseed/plain/releases/plain-code@0.11.3) (2025-11-03)
14
+
15
+ ### What's changed
16
+
17
+ - Improved CLI command descriptions to be more concise and user-friendly ([fdb9e80](https://github.com/dropseed/plain/commit/fdb9e80))
18
+ - The `plain fix` command is now marked as a common command and registered as a shortcut for `plain code fix` ([73d3a48](https://github.com/dropseed/plain/commit/73d3a48), [7910a06](https://github.com/dropseed/plain/commit/7910a06))
19
+
20
+ ### Upgrade instructions
21
+
22
+ - No changes required
23
+
3
24
  ## [0.11.2](https://github.com/dropseed/plain/releases/plain-code@0.11.2) (2025-10-31)
4
25
 
5
26
  ### What's changed
@@ -10,7 +10,7 @@ import click
10
10
 
11
11
  from plain.cli import register_cli
12
12
  from plain.cli.print import print_event
13
- from plain.cli.runtime import without_runtime_setup
13
+ from plain.cli.runtime import common_command, without_runtime_setup
14
14
 
15
15
  from .biome import Biome
16
16
 
@@ -30,7 +30,7 @@ def cli() -> None:
30
30
  @click.option("--force", is_flag=True, help="Reinstall even if up to date")
31
31
  @click.pass_context
32
32
  def install(ctx: click.Context, force: bool) -> None:
33
- """Install or update the Biome standalone per configuration."""
33
+ """Install or update Biome binary"""
34
34
  config = get_code_config()
35
35
 
36
36
  if not config.get("biome", {}).get("enabled", True):
@@ -58,7 +58,7 @@ def install(ctx: click.Context, force: bool) -> None:
58
58
  @without_runtime_setup
59
59
  @cli.command()
60
60
  def update() -> None:
61
- """Update the Biome standalone binary to the latest release."""
61
+ """Update Biome to latest version"""
62
62
  config = get_code_config()
63
63
 
64
64
  if not config.get("biome", {}).get("enabled", True):
@@ -76,7 +76,7 @@ def update() -> None:
76
76
  @click.pass_context
77
77
  @click.argument("path", default=".")
78
78
  def check(ctx: click.Context, path: str) -> None:
79
- """Check the given path for formatting or linting issues."""
79
+ """Check for formatting and linting issues"""
80
80
  ruff_args = ["--config", str(DEFAULT_RUFF_CONFIG)]
81
81
  config = get_code_config()
82
82
 
@@ -118,15 +118,16 @@ def check(ctx: click.Context, path: str) -> None:
118
118
  maybe_exit(result.returncode)
119
119
 
120
120
 
121
+ @common_command
121
122
  @without_runtime_setup
122
- @register_cli("fix")
123
+ @register_cli("fix", shortcut_for="code fix")
123
124
  @cli.command()
124
125
  @click.pass_context
125
126
  @click.argument("path", default=".")
126
127
  @click.option("--unsafe-fixes", is_flag=True, help="Apply ruff unsafe fixes")
127
128
  @click.option("--add-noqa", is_flag=True, help="Add noqa comments to suppress errors")
128
129
  def fix(ctx: click.Context, path: str, unsafe_fixes: bool, add_noqa: bool) -> None:
129
- """Lint and format the given path."""
130
+ """Fix formatting and linting issues"""
130
131
  ruff_args = ["--config", str(DEFAULT_RUFF_CONFIG)]
131
132
  config = get_code_config()
132
133
 
@@ -137,21 +138,32 @@ def fix(ctx: click.Context, path: str, unsafe_fixes: bool, add_noqa: bool) -> No
137
138
  raise click.UsageError("Cannot use both --unsafe-fixes and --add-noqa")
138
139
 
139
140
  if unsafe_fixes:
140
- print_event("Ruff fix (with unsafe fixes)")
141
+ print_event(
142
+ click.style("Ruff lint:", bold=True)
143
+ + click.style(" ruff check --fix --unsafe-fixes", dim=True)
144
+ )
141
145
  result = subprocess.run(
142
146
  ["ruff", "check", path, "--fix", "--unsafe-fixes", *ruff_args]
143
147
  )
144
148
  elif add_noqa:
145
- print_event("Ruff fix (add noqa)")
149
+ print_event(
150
+ click.style("Ruff lint:", bold=True)
151
+ + click.style(" ruff check --add-noqa", dim=True)
152
+ )
146
153
  result = subprocess.run(["ruff", "check", path, "--add-noqa", *ruff_args])
147
154
  else:
148
- print_event("Ruff fix")
155
+ print_event(
156
+ click.style("Ruff lint:", bold=True)
157
+ + click.style(" ruff check --fix", dim=True)
158
+ )
149
159
  result = subprocess.run(["ruff", "check", path, "--fix", *ruff_args])
150
160
 
151
161
  if result.returncode != 0:
152
162
  sys.exit(result.returncode)
153
163
 
154
- print_event("Ruff format")
164
+ print_event(
165
+ click.style("Ruff format:", bold=True) + click.style(" ruff format", dim=True)
166
+ )
155
167
  result = subprocess.run(["ruff", "format", path, *ruff_args])
156
168
  if result.returncode != 0:
157
169
  sys.exit(result.returncode)
@@ -162,12 +174,19 @@ def fix(ctx: click.Context, path: str, unsafe_fixes: bool, add_noqa: bool) -> No
162
174
  if biome.needs_update():
163
175
  ctx.invoke(install)
164
176
 
165
- print_event("Biome format")
166
-
167
177
  args = ["check", path, "--write"]
168
178
 
169
179
  if unsafe_fixes:
170
180
  args.append("--unsafe")
181
+ print_event(
182
+ click.style("Biome:", bold=True)
183
+ + click.style(" biome check --write --unsafe", dim=True)
184
+ )
185
+ else:
186
+ print_event(
187
+ click.style("Biome:", bold=True)
188
+ + click.style(" biome check --write", dim=True)
189
+ )
171
190
 
172
191
  result = biome.invoke(*args)
173
192
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.code"
3
- version = "0.11.2"
3
+ version = "0.11.4"
4
4
  description = "Preconfigured code formatting and linting."
5
5
  authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes