tessl install tessl/pypi-pep257@0.7.0Python docstring style checker for PEP 257 compliance
Agent Success
Agent success rate when using this tile
72%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.04x
Baseline
Agent success rate without this tile
69%
Build a helper that runs a docstring linter over given files or directories while relying on its configuration discovery, inheritance, and CLI overrides.
pyproject.toml, setup.cfg, tox.ini, or .pydocstyle files in parent directories for the selected targets. @testconfig_path argument causes discovery to be skipped and only the supplied config to be used for all targets. @test@generates
from pathlib import Path
from dataclasses import dataclass
from typing import Iterable, Sequence
@dataclass
class LintMessage:
code: str
message: str
location: str # "<path>:<line>"
class ConfigAwareLintRunner:
def __init__(self, root: Path):
"""Prepare the runner scoped to a project root for config discovery."""
def run(
self,
targets: Iterable[Path],
config_path: Path | None = None,
select: Sequence[str] | None = None,
ignore: Sequence[str] | None = None,
) -> list[LintMessage]:
"""
Run the docstring linter on provided targets.
- Uses discovery across supported config files when config_path is None.
- Skips discovery and uses only config_path when provided.
- Applies select/ignore overrides on top of the configuration for this run.
"""Docstring style checker with configuration discovery, inheritance, and CLI overrides.