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-5/

Decorator-aware Docstring Linter

A command-line utility that runs docstring linting on Python source files while allowing decorator- and property-aware behavior.

Capabilities

Decorator filtering

  • When run with --skip-decorators <regex>, docstring checks ignore any function or method decorated with a name matching the pattern; other lint failures still appear with file and line references. @test

Property mood handling

  • Passing --property-decorators <names> ensures methods tagged with those decorators are treated as properties so summary-line mood checks match property expectations and do not enforce imperative tone. @test

Self-only init toggle

  • With --allow-self-init, a __init__(self) without extra parameters is exempt from missing-docstring violations; without the flag the same file reports the missing docstring. @test

CLI

@generates

  • Provide a lint-docstrings entry point accepting one or more file or directory paths.
  • Support options: --skip-decorators, --property-decorators (comma-separated), --allow-self-init, and --explain.
  • Exit with 0 on a clean run, 1 when lint violations are found, and 2 on invalid options.
  • Print lint output with file paths and line numbers; when --explain is present include rule explanations in the output.

API

def main(argv: list[str] | None = None) -> int:
    ...

Dependencies { .dependencies }

pydocstyle { .dependency }

Docstring linting engine used by the CLI.

Install with Tessl CLI

npx tessl i tessl/pypi-pep257

tile.json