Line length
line_length
Resolution of the project's configured ruff line-length.
Thin services/ module in the shape of :mod:axm_edit.services.lint: it
reads the project's configuration and answers a single question — how wide a
line the project actually allows. Strictly read-only.
parse_line_length(pyproject_text)
Extract [tool.ruff] line-length from an in-memory TOML text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pyproject_text
|
str
|
Full |
required |
Returns:
| Type | Description |
|---|---|
int | None
|
The declared integer, or |
int | None
|
text is not valid TOML). |
Source code in packages/axm-edit/src/axm_edit/services/line_length.py
resolve_line_length(root)
Return the line-length configured under root.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root the batch is applied to. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The value declared in |
int
|
data: |