Skip to content

Enable docstring linting and add missing docstrings to public API #192

@jtdub

Description

@jtdub

Description

The project's pyproject.toml currently suppresses docstring requirements:

  • ruff: D100-D107 (missing docstrings) are in the ignore list, tagged "should eventually be enabled"
  • pylint: missing-class-docstring, missing-function-docstring, missing-module-docstring are disabled

As a result, many key public methods lack docstrings:

  • HConfigBase.config_to_get_to()
  • HConfigBase._future() (only has a note about known gaps, no usage docs)
  • HConfigBase.unified_diff()
  • HConfigChild.negate()
  • HConfigChild.is_match() (has a docstring but no Args/Returns)
  • HConfigChild.overwrite_with()
  • HConfigChild class itself
  • HConfigChildren class
  • Most platform driver classes

Proposed Improvement

  1. Incrementally enable D101 (public class), D102 (public method), D103 (public function) in ruff
  2. Add docstrings to the highest-impact public methods first (the ones listed above)
  3. Use a consistent format (Google style or NumPy style) with Args/Returns sections for complex signatures
  4. Re-enable the corresponding pylint checks

The project already has excellent docstrings on WorkflowRemediation, RemediationReporter, and utility functions — extending that standard to the rest of the public API would significantly improve developer experience.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions