readability-cli 0.11.0__tar.gz → 0.11.1__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.
- {readability_cli-0.11.0 → readability_cli-0.11.1}/PKG-INFO +17 -11
- {readability_cli-0.11.0 → readability_cli-0.11.1}/README.md +17 -11
- {readability_cli-0.11.0 → readability_cli-0.11.1}/pyproject.toml +1 -1
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/tools.py +2 -2
- {readability_cli-0.11.0 → readability_cli-0.11.1}/test_checking.py +4 -26
- {readability_cli-0.11.0 → readability_cli-0.11.1}/uv.lock +1 -1
- {readability_cli-0.11.0 → readability_cli-0.11.1}/.github/workflows/ci.yml +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/.github/workflows/publish.yml +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/.github/workflows/update-guides.yml +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/.gitignore +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/.python-version +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/LICENSE +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/biome.json +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/__init__.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/checking.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/cli.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/configs/biome-default.json +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/configs/pyrefly.toml +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/configs/ruff.toml +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guide.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/Rguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/cppguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/csharpguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/docguide-style.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/go-guide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/htmlcssguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/javaguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/jsguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/jsoncguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/objcguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/pyguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/shellguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/tsguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/guides/vimscriptguide.md +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/readability/outline.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/test_guide.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/test_outline.py +0 -0
- {readability_cli-0.11.0 → readability_cli-0.11.1}/test_package.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: readability-cli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.1
|
|
4
4
|
Summary: A CLI to lint, format, and type-check code with Google-style defaults, and pull Google style guides in markdown format.
|
|
5
5
|
Project-URL: Homepage, https://github.com/owahltinez/readability
|
|
6
6
|
Project-URL: Repository, https://github.com/owahltinez/readability
|
|
@@ -103,15 +103,15 @@ such as gofmt and goimports, are unaffected by it.
|
|
|
103
103
|
|
|
104
104
|
### Supported Formats
|
|
105
105
|
|
|
106
|
-
| Formats
|
|
107
|
-
|
|
|
108
|
-
| `.py`
|
|
109
|
-
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html
|
|
110
|
-
| `.go`
|
|
111
|
-
| `.sh`, `.bash`
|
|
112
|
-
| `.rs`
|
|
106
|
+
| Formats | Owners | Project configuration |
|
|
107
|
+
| ---------------------------------------------------------------- | --------------------------------------- | ------------------------------------- |
|
|
108
|
+
| `.py` | Ruff lint/format; Pyrefly type checking | Ruff and Pyrefly native configuration |
|
|
109
|
+
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html` | Biome | `biome.json` or `biome.jsonc` |
|
|
110
|
+
| `.go` | gofmt, goimports | None |
|
|
111
|
+
| `.sh`, `.bash` | shfmt format; shellcheck lint | None |
|
|
112
|
+
| `.rs` | rustfmt | None |
|
|
113
113
|
|
|
114
|
-
YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
114
|
+
Markdown, YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
115
115
|
An unsupported-only path reports that nothing was checked and exits
|
|
116
116
|
successfully.
|
|
117
117
|
|
|
@@ -132,6 +132,12 @@ to Ruff's — which has published seventeen minor series, roughly one every six
|
|
|
132
132
|
weeks. If you need a fixed version, install it: an installed tool always wins
|
|
133
133
|
over a fetched one.
|
|
134
134
|
|
|
135
|
+
Biome is the temporary exception, pinned to 2.5.14: from 2.5.15 it panics
|
|
136
|
+
(`path is expected to be under the root`) when the bundled config sits outside
|
|
137
|
+
the repository being checked, which is every project without its own
|
|
138
|
+
`biome.json` ([biomejs/biome#12158](https://github.com/biomejs/biome/issues/12158)).
|
|
139
|
+
The pin goes once upstream fixes it.
|
|
140
|
+
|
|
135
141
|
Set `UV_OFFLINE=1` to forbid fetching. A tool that then cannot be reached fails
|
|
136
142
|
the run rather than passing it.
|
|
137
143
|
|
|
@@ -204,8 +210,8 @@ For Python, add `[tool.ruff]` or `[tool.pyrefly]` to `pyproject.toml`, or use
|
|
|
204
210
|
their native project configurations in place of bundled defaults. Readability
|
|
205
211
|
does not interpret EditorConfig itself; a canonical tool such as Biome may opt
|
|
206
212
|
into it through that tool's native configuration. Neither gofmt nor goimports
|
|
207
|
-
has project settings. The bundled Biome file requires Biome 2.5 or later
|
|
208
|
-
|
|
213
|
+
has project settings. The bundled Biome file requires Biome 2.5 or later; the
|
|
214
|
+
fallback runner is pinned to 2.5.14 for now.
|
|
209
215
|
|
|
210
216
|
Configuration is found per file, in the file's own directory and then its
|
|
211
217
|
ancestors, which is where each canonical tool looks. A package keeping its
|
|
@@ -89,15 +89,15 @@ such as gofmt and goimports, are unaffected by it.
|
|
|
89
89
|
|
|
90
90
|
### Supported Formats
|
|
91
91
|
|
|
92
|
-
| Formats
|
|
93
|
-
|
|
|
94
|
-
| `.py`
|
|
95
|
-
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html
|
|
96
|
-
| `.go`
|
|
97
|
-
| `.sh`, `.bash`
|
|
98
|
-
| `.rs`
|
|
99
|
-
|
|
100
|
-
YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
92
|
+
| Formats | Owners | Project configuration |
|
|
93
|
+
| ---------------------------------------------------------------- | --------------------------------------- | ------------------------------------- |
|
|
94
|
+
| `.py` | Ruff lint/format; Pyrefly type checking | Ruff and Pyrefly native configuration |
|
|
95
|
+
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html` | Biome | `biome.json` or `biome.jsonc` |
|
|
96
|
+
| `.go` | gofmt, goimports | None |
|
|
97
|
+
| `.sh`, `.bash` | shfmt format; shellcheck lint | None |
|
|
98
|
+
| `.rs` | rustfmt | None |
|
|
99
|
+
|
|
100
|
+
Markdown, YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
101
101
|
An unsupported-only path reports that nothing was checked and exits
|
|
102
102
|
successfully.
|
|
103
103
|
|
|
@@ -118,6 +118,12 @@ to Ruff's — which has published seventeen minor series, roughly one every six
|
|
|
118
118
|
weeks. If you need a fixed version, install it: an installed tool always wins
|
|
119
119
|
over a fetched one.
|
|
120
120
|
|
|
121
|
+
Biome is the temporary exception, pinned to 2.5.14: from 2.5.15 it panics
|
|
122
|
+
(`path is expected to be under the root`) when the bundled config sits outside
|
|
123
|
+
the repository being checked, which is every project without its own
|
|
124
|
+
`biome.json` ([biomejs/biome#12158](https://github.com/biomejs/biome/issues/12158)).
|
|
125
|
+
The pin goes once upstream fixes it.
|
|
126
|
+
|
|
121
127
|
Set `UV_OFFLINE=1` to forbid fetching. A tool that then cannot be reached fails
|
|
122
128
|
the run rather than passing it.
|
|
123
129
|
|
|
@@ -190,8 +196,8 @@ For Python, add `[tool.ruff]` or `[tool.pyrefly]` to `pyproject.toml`, or use
|
|
|
190
196
|
their native project configurations in place of bundled defaults. Readability
|
|
191
197
|
does not interpret EditorConfig itself; a canonical tool such as Biome may opt
|
|
192
198
|
into it through that tool's native configuration. Neither gofmt nor goimports
|
|
193
|
-
has project settings. The bundled Biome file requires Biome 2.5 or later
|
|
194
|
-
|
|
199
|
+
has project settings. The bundled Biome file requires Biome 2.5 or later; the
|
|
200
|
+
fallback runner is pinned to 2.5.14 for now.
|
|
195
201
|
|
|
196
202
|
Configuration is found per file, in the file's own directory and then its
|
|
197
203
|
ancestors, which is where each canonical tool looks. A package keeping its
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "readability-cli"
|
|
3
|
-
version = "0.11.
|
|
3
|
+
version = "0.11.1"
|
|
4
4
|
description = "A CLI to lint, format, and type-check code with Google-style defaults, and pull Google style guides in markdown format."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
@@ -329,7 +329,8 @@ def _plan(
|
|
|
329
329
|
TOOL_RUNNERS = {
|
|
330
330
|
"ruff": ["uvx", "ruff>=0.15"],
|
|
331
331
|
"pyrefly": ["uvx", "pyrefly>=1.2"],
|
|
332
|
-
|
|
332
|
+
# Pinned until 2.5.15's panic with an external config is fixed upstream
|
|
333
|
+
"biome": ["npx", "-y", "@biomejs/biome@2.5.14"],
|
|
333
334
|
}
|
|
334
335
|
|
|
335
336
|
# One formatter owner per extension; configuration never changes selection
|
|
@@ -345,7 +346,6 @@ TOOL_EXTENSIONS = {
|
|
|
345
346
|
".jsonc",
|
|
346
347
|
".css",
|
|
347
348
|
".html",
|
|
348
|
-
".md",
|
|
349
349
|
),
|
|
350
350
|
"gofmt": (".go",),
|
|
351
351
|
"goimports": (".go",),
|
|
@@ -215,7 +215,7 @@ def test_check_command_biome(
|
|
|
215
215
|
assert [
|
|
216
216
|
"npx",
|
|
217
217
|
"-y",
|
|
218
|
-
"@biomejs/biome
|
|
218
|
+
"@biomejs/biome@2.5.14",
|
|
219
219
|
phase,
|
|
220
220
|
"--no-errors-on-unmatched",
|
|
221
221
|
str((Path(cwds[0]) / "script.js").resolve()),
|
|
@@ -1457,7 +1457,9 @@ def test_check_runs_biome_without_a_project_config(
|
|
|
1457
1457
|
)
|
|
1458
1458
|
|
|
1459
1459
|
|
|
1460
|
-
@pytest.mark.parametrize(
|
|
1460
|
+
@pytest.mark.parametrize(
|
|
1461
|
+
"extension", (".md", ".yml", ".yaml", ".scss", ".jsonl")
|
|
1462
|
+
)
|
|
1461
1463
|
@patch("shutil.which")
|
|
1462
1464
|
@patch("subprocess.run")
|
|
1463
1465
|
def test_unsupported_formats_run_no_tool(
|
|
@@ -1480,30 +1482,6 @@ def test_unsupported_formats_run_no_tool(
|
|
|
1480
1482
|
mock_run.assert_not_called()
|
|
1481
1483
|
|
|
1482
1484
|
|
|
1483
|
-
@patch("shutil.which")
|
|
1484
|
-
@patch("subprocess.run")
|
|
1485
|
-
def test_markdown_is_checked_by_biome(
|
|
1486
|
-
mock_run: MagicMock, mock_which: MagicMock, tmp_path: Path
|
|
1487
|
-
) -> None:
|
|
1488
|
-
"""A Markdown file, named or alone in a directory, goes to Biome."""
|
|
1489
|
-
mock_which.side_effect = lambda name: name
|
|
1490
|
-
mock_run.return_value = MagicMock(returncode=0, stdout="", stderr="")
|
|
1491
|
-
|
|
1492
|
-
runner = CliRunner()
|
|
1493
|
-
with runner.isolated_filesystem(temp_dir=tmp_path):
|
|
1494
|
-
Path("docs").mkdir()
|
|
1495
|
-
Path("docs/README.md").touch()
|
|
1496
|
-
|
|
1497
|
-
file_result = runner.invoke(cli, ["check", "docs/README.md"])
|
|
1498
|
-
directory_result = runner.invoke(cli, ["check", "docs"])
|
|
1499
|
-
|
|
1500
|
-
assert file_result.exit_code == 0
|
|
1501
|
-
assert directory_result.exit_code == 0
|
|
1502
|
-
commands = [invocation.args[0] for invocation in mock_run.call_args_list]
|
|
1503
|
-
assert {command[0] for command in commands} == {"biome"}
|
|
1504
|
-
assert len(commands) == 4
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
1485
|
@patch("shutil.which")
|
|
1508
1486
|
@patch("subprocess.run")
|
|
1509
1487
|
def test_mixed_directory_scopes_biome_to_owned_files(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|