Skip to content

docs: correct python.raise_exception example#1772

Merged
Fizzadar merged 1 commit into
pyinfra-dev:3.xfrom
puneetdixit200:docs/1261-raise-exception-signature
May 28, 2026
Merged

docs: correct python.raise_exception example#1772
Fizzadar merged 1 commit into
pyinfra-dev:3.xfrom
puneetdixit200:docs/1261-raise-exception-signature

Conversation

@puneetdixit200

Copy link
Copy Markdown
Contributor

Summary

  • update the python.raise_exception example to pass the exception class and message as positional arguments
  • keep name= as operation metadata rather than an argument to the exception constructor

Fixes #1261

Validation

  • uv run python -m compileall -q src/pyinfra/operations/python.py
  • uv run ruff check src/pyinfra/operations/python.py
  • uv run ruff format --check src/pyinfra/operations/python.py
  • uv run --group test python scripts/lint_arguments_sync.py
  • DOCS_VERSION=latest uv run --python 3.14 --group docs sphinx-build -b html docs build/docs
  • scripts/dev-lint.sh
  • git diff --check
  • git diff HEAD^ --check

The generated build/docs/operations/python.html contains the corrected positional NotImplementedError example.

AI usage disclosure

OpenAI GPT-5 assisted with repository navigation, drafting the focused documentation edit, and selecting validation commands. I reviewed the final change and validation output and understand the doc behavior being corrected.

Checklist

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts (docs-only correction; no operation behavior changed)
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)
  • Pull request title follows the conventional commits format

@wowi42 wowi42 added the documentation Issues with docs/examples/docstrings. label May 24, 2026

@Fizzadar Fizzadar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing @puneetdixit200!

@Fizzadar Fizzadar merged commit a6fac27 into pyinfra-dev:3.x May 28, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Issues with docs/examples/docstrings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python.raise_exception() docs give wrong signature

3 participants