Sphinx extension to support docstrings in Numpy format
A lightweight helper module that wraps the dependency's command-line tools to render NumPy-style docstrings, validate a specific object, and lint multiple files.
Wrap the dependency's CLI entrypoints for rendering, validation, and linting rather than reimplementing docstring parsing. Support forwarding an optional config path to render and validate, and optional ignore patterns when linting.
@generates
from typing import Dict, List, Optional
def render_docstring(import_path: str, config: Optional[Dict[str, str]] = None) -> str:
"""Render RST for the given import path using the dependency's CLI."""
def validate_docstring(import_path: str, checks: Optional[List[str]] = None) -> List[str]:
"""Run validation for the given import path and return failing code strings in order."""
def lint_files(paths: List[str], ignores: Optional[List[str]] = None) -> Dict[str, List[str]]:
"""Run linting for the provided file paths and return failing code strings per file."""Provides CLI utilities for rendering docstrings, validating a single object, and linting files.
tessl i tessl/pypi-numpydoc@1.9.0evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9