Skip to content

Auto insert raises block, fix Bot kwargs insertion regression#5241

Merged
harshil21 merged 4 commits into
doc-fixesfrom
auto-doc-raises
May 26, 2026
Merged

Auto insert raises block, fix Bot kwargs insertion regression#5241
harshil21 merged 4 commits into
doc-fixesfrom
auto-doc-raises

Conversation

@harshil21
Copy link
Copy Markdown
Member

@harshil21 harshil21 commented May 20, 2026

This PR does two things:

  1. Fixes a regression from Fixing failing sphinx builds #5124 and Update Ruff to v0.15.0 #5122 which causes no Shortcut admonitions to generate, and no keyword arguments for the bot methods to be inserted in the documentation.
  2. Expands the insertion logic to now also automatically add the Raises: block for bot methods which have a standard Raises message. Thus, the Raises: block in set_game_score is untouched, for example.

This helps reduce the LoC and makes implementing new API updates just a little bit more faster.

  • Manually check if doc built properly as intended

Comment thread docs/auxil/sphinx_hooks.py
Copy link
Copy Markdown
Member

@aelkheir aelkheir left a comment

Choose a reason for hiding this comment

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

:shipit:
Just one comment.
PS:
‎changes/unreleased/5240.iJXyH8RNWNNQpC47SfNHzw.toml needs updating

Comment thread src/telegram/_bot.py
@harshil21 harshil21 merged commit 0c7053c into doc-fixes May 26, 2026
2 checks passed
@harshil21 harshil21 deleted the auto-doc-raises branch May 26, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ documentation affected functionality: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants