Skip to content

feat(cli): add --docstring-style flag to override config #345

@Alberto-Codes

Description

@Alberto-Codes

Problem

Projects using Sphinx/RST docstrings must set docstring-style = "sphinx" in [tool.docvet] to avoid false positives. If the project has no pyproject.toml or the user wants a quick one-off run (e.g., evaluating docvet on a new codebase), there's no way to set the style without editing config files.

Discovered while running docvet against boto3 — had to append a [tool.docvet] section to their pyproject.toml just to set the style.

Proposal

Add --docstring-style as a top-level CLI option (alongside --format, --output, --config):

docvet --docstring-style sphinx check --all
  • Values: google (default), sphinx
  • CLI flag overrides pyproject.toml value when both are set
  • Available on the app callback so it applies to all subcommands

Context

  • docstring-style config key shipped in Epic 34 (Story 34.1)
  • Other top-level options (--format, --output, --verbose, --quiet, --summary, --config) already follow this pattern
  • Zero new dependencies — just a typer option wired to the existing config field

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions