readability-cli 0.8.6__tar.gz → 0.10.0__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.8.6 → readability_cli-0.10.0}/.github/workflows/update-guides.yml +1 -1
- {readability_cli-0.8.6 → readability_cli-0.10.0}/PKG-INFO +74 -40
- {readability_cli-0.8.6 → readability_cli-0.10.0}/README.md +73 -39
- {readability_cli-0.8.6 → readability_cli-0.10.0}/pyproject.toml +4 -7
- readability_cli-0.10.0/readability/__init__.py +0 -0
- readability_cli-0.10.0/readability/checking.py +280 -0
- readability_cli-0.10.0/readability/cli.py +251 -0
- readability_cli-0.10.0/readability/guide.py +250 -0
- readability_cli-0.10.0/readability/outline.py +681 -0
- readability_cli-0.10.0/readability/tools.py +560 -0
- readability_cli-0.10.0/test_checking.py +2045 -0
- readability_cli-0.10.0/test_guide.py +223 -0
- readability_cli-0.10.0/test_outline.py +952 -0
- readability_cli-0.10.0/test_package.py +25 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0}/uv.lock +1 -1
- readability_cli-0.8.6/.prettierignore +0 -2
- readability_cli-0.8.6/readability.py +0 -1815
- readability_cli-0.8.6/test_readability.py +0 -2450
- {readability_cli-0.8.6 → readability_cli-0.10.0}/.github/workflows/ci.yml +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0}/.github/workflows/publish.yml +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0}/.gitignore +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0}/.python-version +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0}/LICENSE +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/configs/biome-default.json +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/configs/pyrefly.toml +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/configs/ruff.toml +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/Rguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/cppguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/csharp-style.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/docguide-style.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/go-guide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/htmlcssguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/javaguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/jsguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/jsoncstyleguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/objcguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/pyguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/shellguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/tsguide.md +0 -0
- {readability_cli-0.8.6 → readability_cli-0.10.0/readability}/guides/vimscriptguide.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: readability-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
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
|
|
@@ -23,9 +23,9 @@ quick access to style conventions without browsing HTML pages.
|
|
|
23
23
|
## Features
|
|
24
24
|
|
|
25
25
|
- **Linting & Formatting**: A `check` command that automatically detects and
|
|
26
|
-
runs relevant tools (Ruff, Pyrefly, Biome,
|
|
27
|
-
- **
|
|
28
|
-
|
|
26
|
+
runs relevant tools (Ruff, Pyrefly, Biome, and gofmt) for your project.
|
|
27
|
+
- **Predictable Ownership**: Every supported format has fixed tools, so
|
|
28
|
+
configuration customizes checks without changing which formatter runs.
|
|
29
29
|
- **Style Guides**: A `guide` command that fetches the latest Google style
|
|
30
30
|
guides (Python, Shell, C++, Java, JS/TS, Go, etc.) converted to Markdown, and
|
|
31
31
|
outlines, addresses, and searches them by section rather than serving 200 KB
|
|
@@ -78,8 +78,8 @@ uv run readability sync
|
|
|
78
78
|
## Checking and Formatting
|
|
79
79
|
|
|
80
80
|
The `check` command identifies and runs relevant linting and formatting tools
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
solely from file extensions. Configuration can customize the assigned tools,
|
|
82
|
+
but cannot opt another tool into a format:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
# Run checks on the current directory
|
|
@@ -92,21 +92,22 @@ readability check src/ tests/ main.py
|
|
|
92
92
|
readability check . --fix
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
### Supported
|
|
95
|
+
### Supported Formats
|
|
96
96
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
| **Prettier** | `.js`, `.ts`, `.jsx`, `.tsx`, `.json`, `.css`, `.scss`, `.html`, `.md`, `.yml`, `.yaml` | none for Markdown, YAML, and SCSS | `npx` |
|
|
103
|
-
| **gofmt** | `.go` | `go.mod` | — |
|
|
97
|
+
| Formats | Owners | Project configuration |
|
|
98
|
+
| ---------------------------------------------------------------- | --------------------------------------- | ------------------------------------- |
|
|
99
|
+
| `.py` | Ruff lint/format; Pyrefly type checking | Ruff and Pyrefly native configuration |
|
|
100
|
+
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html` | Biome | `biome.json` or `biome.jsonc` |
|
|
101
|
+
| `.go` | gofmt | None |
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
Markdown, YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
104
|
+
An unsupported-only path reports that nothing was checked and exits
|
|
105
|
+
successfully.
|
|
106
|
+
|
|
107
|
+
Biome first checks a project's `node_modules/.bin`. Ruff, Pyrefly, and Biome
|
|
108
|
+
then use `PATH`, followed by `uvx` for the Python tools or `npx` for Biome. The
|
|
109
|
+
runners cache downloads, so subsequent runs work offline. Gofmt ships with Go
|
|
110
|
+
and must be available on `PATH`.
|
|
110
111
|
|
|
111
112
|
That keeps this package at ~4 MB rather than the ~54 MB it would take to carry
|
|
112
113
|
Ruff and Pyrefly itself — a cost that would fall on everyone using only `guide`.
|
|
@@ -123,18 +124,17 @@ over a fetched one.
|
|
|
123
124
|
Set `UV_OFFLINE=1` to forbid fetching. A tool that then cannot be reached fails
|
|
124
125
|
the run rather than passing it.
|
|
125
126
|
|
|
126
|
-
Ruff, Pyrefly, and Biome ship with bundled configurations, so they run on
|
|
127
|
-
file they
|
|
128
|
-
|
|
129
|
-
formats into Prettier too. Gofmt waits for a `go.mod` file.
|
|
127
|
+
Ruff, Pyrefly, and Biome ship with bundled configurations, so they run on every
|
|
128
|
+
file they own without project setup. Gofmt runs on `.go` files even when there
|
|
129
|
+
is no `go.mod`.
|
|
130
130
|
|
|
131
131
|
A tool that could not be reached at all is never skipped quietly:
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
134
|
# Some tools ran, so the result stands, but coverage was partial
|
|
135
135
|
$ readability check src/
|
|
136
|
-
Warning: not installed, so not run:
|
|
137
|
-
No findings in 1 path(s) (ruff
|
|
136
|
+
Warning: not installed, so not run: pyrefly.
|
|
137
|
+
No findings in 1 path(s) (ruff).
|
|
138
138
|
|
|
139
139
|
# Nothing ran, so there is no result to report
|
|
140
140
|
$ readability check src/
|
|
@@ -157,7 +157,7 @@ or exit-code decisions:
|
|
|
157
157
|
```python
|
|
158
158
|
from pathlib import Path
|
|
159
159
|
|
|
160
|
-
from readability import check_paths
|
|
160
|
+
from readability.checking import check_paths
|
|
161
161
|
|
|
162
162
|
report = check_paths(["src", Path("tests")], project_root=Path.cwd())
|
|
163
163
|
if report.findings or report.failed or not report.ran:
|
|
@@ -168,25 +168,58 @@ The returned `CheckReport` records only whether findings occurred and which
|
|
|
168
168
|
tools ran, were skipped, or failed. Detailed tool findings are still written as
|
|
169
169
|
each tool runs. Every path is validated before any tool runs, and a missing one
|
|
170
170
|
raises `FileNotFoundError` rather than being misreported as a finding. Relative
|
|
171
|
-
paths remain relative to the process working directory
|
|
172
|
-
configuration discovery
|
|
171
|
+
paths remain relative to the process working directory. `project_root` bounds
|
|
172
|
+
configuration discovery, locates project-local tool installs, and roots
|
|
173
|
+
ignore-file discovery. Because it bounds discovery, a caller that passes one
|
|
174
|
+
gets the same verdict for the same files wherever they sit, which is what makes
|
|
175
|
+
the result usable as a baseline. It defaults to the repository the process is
|
|
176
|
+
in, so the command agrees with the tools rather than with the directory the
|
|
177
|
+
caller happened to be standing in.
|
|
173
178
|
|
|
174
|
-
###
|
|
179
|
+
### Configuring Formats
|
|
175
180
|
|
|
176
181
|
Ruff and Pyrefly defaults follow the
|
|
177
182
|
[Google Python style guide](https://google.github.io/styleguide/pyguide.html):
|
|
178
183
|
80-column lines, Google docstrings, import ordering, and full type checking. The
|
|
179
184
|
Biome default applies the 80-column lines and two-space indentation of the
|
|
180
185
|
[Google JavaScript style guide](https://google.github.io/styleguide/jsguide.html)
|
|
181
|
-
and enables Biome's recommended lint rules.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
and enables Biome's recommended lint rules. Project `biome.json` and
|
|
187
|
+
`biome.jsonc` files replace those bundled defaults for Biome-owned formats.
|
|
188
|
+
|
|
189
|
+
For Python, add `[tool.ruff]` or `[tool.pyrefly]` to `pyproject.toml`, or use
|
|
190
|
+
`ruff.toml`, `.ruff.toml`, or `pyrefly.toml`. Ruff, Pyrefly, and Biome load
|
|
191
|
+
their native project configurations in place of bundled defaults. Readability
|
|
192
|
+
does not interpret EditorConfig itself; a canonical tool such as Biome may opt
|
|
193
|
+
into it through that tool's native configuration. Gofmt has no project settings.
|
|
194
|
+
The bundled Biome file requires Biome 2.5 or later, matching the fallback
|
|
195
|
+
runner's version floor.
|
|
196
|
+
|
|
197
|
+
Configuration is found per file, in the file's own directory and then its
|
|
198
|
+
ancestors, which is where each canonical tool looks. A package keeping its
|
|
199
|
+
settings in a subdirectory is checked against them however it is reached:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# Uses web/biome.json, not the bundled default
|
|
203
|
+
readability check web/app.ts
|
|
204
|
+
|
|
205
|
+
# Uses the repository root's [tool.ruff], not the bundled default
|
|
206
|
+
cd pkg && readability check module.py
|
|
207
|
+
|
|
208
|
+
# pkg/ is checked against pkg/pyproject.toml, the rest against the defaults
|
|
209
|
+
readability check .
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
A tool is only told which configuration to use when the file has none, because
|
|
213
|
+
each one resolves its own hierarchy: a single Ruff invocation over two packages
|
|
214
|
+
declaring different line lengths reports each against its own. So a mixed tree
|
|
215
|
+
needs no choosing between configurations, and the bundled default never
|
|
216
|
+
overrides one the project declared.
|
|
217
|
+
|
|
218
|
+
Discovery is per tool, so configuring one leaves the others on their bundled
|
|
219
|
+
defaults. It is also bounded, by the repository the command runs in, or by
|
|
220
|
+
`project_root` when calling `check_paths` directly. Configuration outside that
|
|
221
|
+
boundary is not read, so the same paths get the same answer wherever the
|
|
222
|
+
repository sits.
|
|
190
223
|
|
|
191
224
|
## Style Guides
|
|
192
225
|
|
|
@@ -338,14 +371,15 @@ readability sync
|
|
|
338
371
|
|
|
339
372
|
### Offline Mode
|
|
340
373
|
|
|
341
|
-
The tool stores local copies of the style guides in the
|
|
374
|
+
The tool stores local copies of the style guides in the
|
|
375
|
+
`readability/guides/` directory and
|
|
342
376
|
the `guide` command uses these local files when they exist. The bundled copies
|
|
343
377
|
are automatically synchronized weekly from the official
|
|
344
378
|
[Google Style Guides](https://google.github.io/styleguide/) repository via
|
|
345
379
|
GitHub Actions, and you can refresh your local cache at any time with the `sync`
|
|
346
380
|
command.
|
|
347
381
|
|
|
348
|
-
You can override the default
|
|
382
|
+
You can override the default guide directory by setting the
|
|
349
383
|
`READABILITY_CACHE` environment variable. This is useful if you want to store
|
|
350
384
|
the guides in a specific location or share them across different installations:
|
|
351
385
|
|
|
@@ -9,9 +9,9 @@ quick access to style conventions without browsing HTML pages.
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
11
|
- **Linting & Formatting**: A `check` command that automatically detects and
|
|
12
|
-
runs relevant tools (Ruff, Pyrefly, Biome,
|
|
13
|
-
- **
|
|
14
|
-
|
|
12
|
+
runs relevant tools (Ruff, Pyrefly, Biome, and gofmt) for your project.
|
|
13
|
+
- **Predictable Ownership**: Every supported format has fixed tools, so
|
|
14
|
+
configuration customizes checks without changing which formatter runs.
|
|
15
15
|
- **Style Guides**: A `guide` command that fetches the latest Google style
|
|
16
16
|
guides (Python, Shell, C++, Java, JS/TS, Go, etc.) converted to Markdown, and
|
|
17
17
|
outlines, addresses, and searches them by section rather than serving 200 KB
|
|
@@ -64,8 +64,8 @@ uv run readability sync
|
|
|
64
64
|
## Checking and Formatting
|
|
65
65
|
|
|
66
66
|
The `check` command identifies and runs relevant linting and formatting tools
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
solely from file extensions. Configuration can customize the assigned tools,
|
|
68
|
+
but cannot opt another tool into a format:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
# Run checks on the current directory
|
|
@@ -78,21 +78,22 @@ readability check src/ tests/ main.py
|
|
|
78
78
|
readability check . --fix
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
### Supported
|
|
81
|
+
### Supported Formats
|
|
82
82
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
| **Prettier** | `.js`, `.ts`, `.jsx`, `.tsx`, `.json`, `.css`, `.scss`, `.html`, `.md`, `.yml`, `.yaml` | none for Markdown, YAML, and SCSS | `npx` |
|
|
89
|
-
| **gofmt** | `.go` | `go.mod` | — |
|
|
83
|
+
| Formats | Owners | Project configuration |
|
|
84
|
+
| ---------------------------------------------------------------- | --------------------------------------- | ------------------------------------- |
|
|
85
|
+
| `.py` | Ruff lint/format; Pyrefly type checking | Ruff and Pyrefly native configuration |
|
|
86
|
+
| `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.css`, `.html` | Biome | `biome.json` or `biome.jsonc` |
|
|
87
|
+
| `.go` | gofmt | None |
|
|
90
88
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
Markdown, YAML, SCSS, JSONL, and extensions not listed above are unsupported.
|
|
90
|
+
An unsupported-only path reports that nothing was checked and exits
|
|
91
|
+
successfully.
|
|
92
|
+
|
|
93
|
+
Biome first checks a project's `node_modules/.bin`. Ruff, Pyrefly, and Biome
|
|
94
|
+
then use `PATH`, followed by `uvx` for the Python tools or `npx` for Biome. The
|
|
95
|
+
runners cache downloads, so subsequent runs work offline. Gofmt ships with Go
|
|
96
|
+
and must be available on `PATH`.
|
|
96
97
|
|
|
97
98
|
That keeps this package at ~4 MB rather than the ~54 MB it would take to carry
|
|
98
99
|
Ruff and Pyrefly itself — a cost that would fall on everyone using only `guide`.
|
|
@@ -109,18 +110,17 @@ over a fetched one.
|
|
|
109
110
|
Set `UV_OFFLINE=1` to forbid fetching. A tool that then cannot be reached fails
|
|
110
111
|
the run rather than passing it.
|
|
111
112
|
|
|
112
|
-
Ruff, Pyrefly, and Biome ship with bundled configurations, so they run on
|
|
113
|
-
file they
|
|
114
|
-
|
|
115
|
-
formats into Prettier too. Gofmt waits for a `go.mod` file.
|
|
113
|
+
Ruff, Pyrefly, and Biome ship with bundled configurations, so they run on every
|
|
114
|
+
file they own without project setup. Gofmt runs on `.go` files even when there
|
|
115
|
+
is no `go.mod`.
|
|
116
116
|
|
|
117
117
|
A tool that could not be reached at all is never skipped quietly:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
120
|
# Some tools ran, so the result stands, but coverage was partial
|
|
121
121
|
$ readability check src/
|
|
122
|
-
Warning: not installed, so not run:
|
|
123
|
-
No findings in 1 path(s) (ruff
|
|
122
|
+
Warning: not installed, so not run: pyrefly.
|
|
123
|
+
No findings in 1 path(s) (ruff).
|
|
124
124
|
|
|
125
125
|
# Nothing ran, so there is no result to report
|
|
126
126
|
$ readability check src/
|
|
@@ -143,7 +143,7 @@ or exit-code decisions:
|
|
|
143
143
|
```python
|
|
144
144
|
from pathlib import Path
|
|
145
145
|
|
|
146
|
-
from readability import check_paths
|
|
146
|
+
from readability.checking import check_paths
|
|
147
147
|
|
|
148
148
|
report = check_paths(["src", Path("tests")], project_root=Path.cwd())
|
|
149
149
|
if report.findings or report.failed or not report.ran:
|
|
@@ -154,25 +154,58 @@ The returned `CheckReport` records only whether findings occurred and which
|
|
|
154
154
|
tools ran, were skipped, or failed. Detailed tool findings are still written as
|
|
155
155
|
each tool runs. Every path is validated before any tool runs, and a missing one
|
|
156
156
|
raises `FileNotFoundError` rather than being misreported as a finding. Relative
|
|
157
|
-
paths remain relative to the process working directory
|
|
158
|
-
configuration discovery
|
|
157
|
+
paths remain relative to the process working directory. `project_root` bounds
|
|
158
|
+
configuration discovery, locates project-local tool installs, and roots
|
|
159
|
+
ignore-file discovery. Because it bounds discovery, a caller that passes one
|
|
160
|
+
gets the same verdict for the same files wherever they sit, which is what makes
|
|
161
|
+
the result usable as a baseline. It defaults to the repository the process is
|
|
162
|
+
in, so the command agrees with the tools rather than with the directory the
|
|
163
|
+
caller happened to be standing in.
|
|
159
164
|
|
|
160
|
-
###
|
|
165
|
+
### Configuring Formats
|
|
161
166
|
|
|
162
167
|
Ruff and Pyrefly defaults follow the
|
|
163
168
|
[Google Python style guide](https://google.github.io/styleguide/pyguide.html):
|
|
164
169
|
80-column lines, Google docstrings, import ordering, and full type checking. The
|
|
165
170
|
Biome default applies the 80-column lines and two-space indentation of the
|
|
166
171
|
[Google JavaScript style guide](https://google.github.io/styleguide/jsguide.html)
|
|
167
|
-
and enables Biome's recommended lint rules.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
and enables Biome's recommended lint rules. Project `biome.json` and
|
|
173
|
+
`biome.jsonc` files replace those bundled defaults for Biome-owned formats.
|
|
174
|
+
|
|
175
|
+
For Python, add `[tool.ruff]` or `[tool.pyrefly]` to `pyproject.toml`, or use
|
|
176
|
+
`ruff.toml`, `.ruff.toml`, or `pyrefly.toml`. Ruff, Pyrefly, and Biome load
|
|
177
|
+
their native project configurations in place of bundled defaults. Readability
|
|
178
|
+
does not interpret EditorConfig itself; a canonical tool such as Biome may opt
|
|
179
|
+
into it through that tool's native configuration. Gofmt has no project settings.
|
|
180
|
+
The bundled Biome file requires Biome 2.5 or later, matching the fallback
|
|
181
|
+
runner's version floor.
|
|
182
|
+
|
|
183
|
+
Configuration is found per file, in the file's own directory and then its
|
|
184
|
+
ancestors, which is where each canonical tool looks. A package keeping its
|
|
185
|
+
settings in a subdirectory is checked against them however it is reached:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Uses web/biome.json, not the bundled default
|
|
189
|
+
readability check web/app.ts
|
|
190
|
+
|
|
191
|
+
# Uses the repository root's [tool.ruff], not the bundled default
|
|
192
|
+
cd pkg && readability check module.py
|
|
193
|
+
|
|
194
|
+
# pkg/ is checked against pkg/pyproject.toml, the rest against the defaults
|
|
195
|
+
readability check .
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
A tool is only told which configuration to use when the file has none, because
|
|
199
|
+
each one resolves its own hierarchy: a single Ruff invocation over two packages
|
|
200
|
+
declaring different line lengths reports each against its own. So a mixed tree
|
|
201
|
+
needs no choosing between configurations, and the bundled default never
|
|
202
|
+
overrides one the project declared.
|
|
203
|
+
|
|
204
|
+
Discovery is per tool, so configuring one leaves the others on their bundled
|
|
205
|
+
defaults. It is also bounded, by the repository the command runs in, or by
|
|
206
|
+
`project_root` when calling `check_paths` directly. Configuration outside that
|
|
207
|
+
boundary is not read, so the same paths get the same answer wherever the
|
|
208
|
+
repository sits.
|
|
176
209
|
|
|
177
210
|
## Style Guides
|
|
178
211
|
|
|
@@ -324,14 +357,15 @@ readability sync
|
|
|
324
357
|
|
|
325
358
|
### Offline Mode
|
|
326
359
|
|
|
327
|
-
The tool stores local copies of the style guides in the
|
|
360
|
+
The tool stores local copies of the style guides in the
|
|
361
|
+
`readability/guides/` directory and
|
|
328
362
|
the `guide` command uses these local files when they exist. The bundled copies
|
|
329
363
|
are automatically synchronized weekly from the official
|
|
330
364
|
[Google Style Guides](https://google.github.io/styleguide/) repository via
|
|
331
365
|
GitHub Actions, and you can refresh your local cache at any time with the `sync`
|
|
332
366
|
command.
|
|
333
367
|
|
|
334
|
-
You can override the default
|
|
368
|
+
You can override the default guide directory by setting the
|
|
335
369
|
`READABILITY_CACHE` environment variable. This is useful if you want to store
|
|
336
370
|
the guides in a specific location or share them across different installations:
|
|
337
371
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "readability-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.10.0"
|
|
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"
|
|
@@ -16,17 +16,13 @@ Homepage = "https://github.com/owahltinez/readability"
|
|
|
16
16
|
Repository = "https://github.com/owahltinez/readability"
|
|
17
17
|
|
|
18
18
|
[project.scripts]
|
|
19
|
-
readability = "readability:main"
|
|
19
|
+
readability = "readability.cli:main"
|
|
20
20
|
|
|
21
21
|
[tool.uv]
|
|
22
22
|
package = true
|
|
23
23
|
|
|
24
24
|
[tool.hatch.build.targets.wheel]
|
|
25
|
-
|
|
26
|
-
"/readability.py",
|
|
27
|
-
"/guides",
|
|
28
|
-
"/configs",
|
|
29
|
-
]
|
|
25
|
+
packages = ["readability"]
|
|
30
26
|
|
|
31
27
|
[build-system]
|
|
32
28
|
requires = ["hatchling"]
|
|
@@ -54,3 +50,4 @@ convention = "google"
|
|
|
54
50
|
[tool.ruff.lint.per-file-ignores]
|
|
55
51
|
"test_*.py" = ["D"]
|
|
56
52
|
"*_test.py" = ["D"]
|
|
53
|
+
"readability/__init__.py" = ["D104"]
|
|
File without changes
|