Skip to content

Fix docstring formatting#1022

Draft
ogenstad wants to merge 1 commit into
stablefrom
pog-documentation-formatting
Draft

Fix docstring formatting#1022
ogenstad wants to merge 1 commit into
stablefrom
pog-documentation-formatting

Conversation

@ogenstad
Copy link
Copy Markdown
Contributor

@ogenstad ogenstad commented May 14, 2026

Why

  • Cleaner reading of docstrings
  • Tighten ruff rules before requiring docstrings in additional places

What changed

  • Mainly whitespaces and punctuation
  • At times insert linebreaks
  • Rules in ruff
  • Most notable change is a sorting function in the tests that only had an ascii drawing as a docstring, here a sensible header was added.

Summary by cubic

Standardized docstrings across the SDK, tests, and docs for clearer, consistent API references. Tightened ruff docstring checks (now enforcing summary punctuation and section formatting) without changing runtime behavior.

  • Refactors
    • Normalized first-line summaries (imperative, end with a period) and added missing blank lines; improved “Initialize …” constructors and “Base class …” summaries.
    • Clarified Args/Returns/Raises and reordered sections consistently; explicitly documented returns for execute_graphql (async/sync) and convert_object_type.
    • Polished SDK and CLI docs (infrahubctl graphql/validate, client and node refs); tightened wording in docs generator and tests.
    • Removed ruff ignores D205, D400, D415, D420 in pyproject.toml to enforce stricter docstring rules.
    • Added developer notes: a pytest check-integration bug report and a type-safety audit (documentation only, no code changes).

Written for commit 3475248. Summary will update on new commits.

@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable    #1022   +/-   ##
=======================================
  Coverage   81.56%   81.56%           
=======================================
  Files         134      134           
  Lines       11442    11442           
  Branches     1730     1730           
=======================================
  Hits         9333     9333           
  Misses       1564     1564           
  Partials      545      545           
Flag Coverage Δ
integration-tests 41.49% <ø> (ø)
python-3.10 54.57% <ø> (-0.02%) ⬇️
python-3.11 54.58% <ø> (ø)
python-3.12 54.57% <ø> (-0.02%) ⬇️
python-3.13 54.57% <ø> (-0.02%) ⬇️
python-3.14 54.58% <ø> (+0.01%) ⬆️
python-filler-3.12 22.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/analyzer.py 84.52% <ø> (ø)
infrahub_sdk/checks.py 70.19% <ø> (ø)
infrahub_sdk/client.py 74.58% <ø> (ø)
infrahub_sdk/config.py 91.13% <ø> (ø)
infrahub_sdk/convert_object_type.py 84.00% <ø> (ø)
infrahub_sdk/ctl/graphql.py 88.54% <ø> (ø)
infrahub_sdk/ctl/parameters.py 100.00% <ø> (ø)
infrahub_sdk/ctl/validate.py 52.11% <ø> (ø)
infrahub_sdk/exceptions.py 89.11% <ø> (ø)
infrahub_sdk/generator.py 79.06% <ø> (ø)
... and 24 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad ogenstad force-pushed the pog-documentation-formatting branch from 544416f to 3475248 Compare May 14, 2026 05:42
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3475248
Status: ✅  Deploy successful!
Preview URL: https://cd1fb058.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-documentation-formatting.infrahub-sdk-python.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant