Skip to content

Split apart ruff doc rules and add whitespace to docstrings#1004

Merged
ogenstad merged 1 commit intostablefrom
pog-ruff-doc-rules
May 9, 2026
Merged

Split apart ruff doc rules and add whitespace to docstrings#1004
ogenstad merged 1 commit intostablefrom
pog-ruff-doc-rules

Conversation

@ogenstad
Copy link
Copy Markdown
Contributor

@ogenstad ogenstad commented May 9, 2026

Why

Twin PR to opsmill/infrahub#9199

Previously all documentation rules in ruff were ignored, split these apart into smaller chunks so that we can consider each rule in isolation. The primary goal will be to add DOC501 (docstring-missing-exception) where it's missing today and then to enable the rules to require docstrings in general.

What changed

  • Mainly shift around rules in pyproject.toml
  • One of the violating rules had to do with whitespaces in existing docstrings, these were auto fixable with ruff as a formatting issue so I reformatted the files violating that rule.

@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label May 9, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

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

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0b64035
Status: ✅  Deploy successful!
Preview URL: https://c851c60d.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-ruff-doc-rules.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable    #1004   +/-   ##
=======================================
  Coverage   81.41%   81.41%           
=======================================
  Files         134      134           
  Lines       11347    11347           
  Branches     1703     1703           
=======================================
  Hits         9238     9238           
  Misses       1566     1566           
  Partials      543      543           
Flag Coverage Δ
integration-tests 41.84% <ø> (ø)
python-3.10 54.36% <ø> (ø)
python-3.11 54.34% <ø> (ø)
python-3.12 54.36% <ø> (ø)
python-3.13 54.34% <ø> (-0.02%) ⬇️
python-3.14 54.34% <ø> (-0.02%) ⬇️
python-filler-3.12 22.74% <ø> (ø)

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

Files with missing lines Coverage Δ
infrahub_sdk/_importer.py 91.42% <ø> (ø)
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/branch.py 81.48% <ø> (ø)
infrahub_sdk/ctl/check.py 26.44% <ø> (ø)
infrahub_sdk/ctl/cli_commands.py 72.33% <ø> (ø)
infrahub_sdk/ctl/config.py 67.27% <ø> (ø)
infrahub_sdk/ctl/formatters/__init__.py 100.00% <ø> (ø)
... and 38 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-ruff-doc-rules branch from 52c3c30 to 0b64035 Compare May 9, 2026 08:44
@ogenstad ogenstad marked this pull request as ready for review May 9, 2026 09:15
@ogenstad ogenstad requested a review from a team as a code owner May 9, 2026 09:15
@ogenstad ogenstad merged commit 191e024 into stable May 9, 2026
20 checks passed
@ogenstad ogenstad deleted the pog-ruff-doc-rules branch May 9, 2026 13:09
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.

2 participants