CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pep257

Python docstring style checker for PEP 257 compliance

72

1.04x
Overview
Eval results
Files

task.mdevals/scenario-7/

Docstring Reporter Output Controls

A small CLI that runs a docstring linter over a provided path while letting the caller opt into richer reporting (explanations, source snippets, verbose logs, and a violation count summary). Default runs should emit only the standard violation lines and exit with a non-zero status when violations exist.

Capabilities

Explanation toggle

  • Supplying an --include-explanations flag appends the rule explanations after each violation; omitting the flag leaves explanations out. @test

Source snippet toggle

  • Supplying an --include-source flag prints the offending source lines alongside each violation; omitting the flag leaves source snippets out. This should work alongside explanations when both toggles are used. @test

Verbose run logging

  • Supplying an --verbose-run flag enables verbose logging that shows which files are inspected; the default run keeps that chatter hidden. @test

Violation count summary

  • Supplying a --with-count flag appends a final line stating the total number of violations and that count matches the violations emitted above; the line is absent when the flag is not provided. @test

Implementation

@generates

API

def main(argv: list[str] | None = None) -> int:
    """Parse CLI args, run the docstring linter with requested output controls, and return the exit code."""

Dependencies { .dependencies }

pydocstyle { .dependency }

Docstring linter used to produce violations, optional explanations, source snippets, verbose logging, and a count summary.

Install with Tessl CLI

npx tessl i tessl/pypi-pep257

tile.json