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

Inline Noqa Docstring Lint Runner

Build a small utility that lint-checks Python files for docstring issues while allowing callers to decide whether inline # noqa comments suppress violations.

Capabilities

Honors inline suppressions

  • When respect_inline_noqa is True, a public function or class line ending with # noqa does not produce missing-docstring violations. @test

Toggle suppressions off

  • When respect_inline_noqa is False, the same # noqa markers no longer silence missing-docstring errors for public items. @test

Code-specific suppression

  • Inline # noqa: D400 suppresses only summary-format violations while still reporting other codes in the file. @test

Implementation

@generates

API

from dataclasses import dataclass
from pathlib import Path
from typing import Iterable, List

@dataclass
class Violation:
    code: str
    path: Path
    line: int
    message: str

def lint_paths(paths: Iterable[Path], respect_inline_noqa: bool = True) -> List[Violation]:
    """Return violations found across the given files or directories, ordered by path then line."""

Dependencies { .dependencies }

pydocstyle { .dependency }

Docstring linting engine with inline # noqa handling.

Install with Tessl CLI

npx tessl i tessl/pypi-pep257

tile.json