Skip to content

Fix docstring Args entries that name a parameter the class does not take - #5326

Merged
harshil21 merged 3 commits into
python-telegram-bot:doc-fixesfrom
darkdi:fix/docstring-arg-names
Sep 1, 2026
Merged

harshil21 merged 3 commits into
python-telegram-bot:doc-fixesfrom
darkdi:fix/docstring-arg-names

Conversation

@darkdi

@darkdi darkdi commented Aug 7, 2026

Copy link
Copy Markdown

Six Args: entries name something the callable does not take.

Four are the PaidMedia subclasses. Each documents type under Args:, but none of their __init__ takes it: super().__init__(type=PaidMedia.PREVIEW) and so on. MessageOrigin* is built exactly the same way and documents type only under Attributes:, which is what made me read these as a slip rather than a house style. The Attributes: entry stays in all four.

decrypt documents a file argument it does not have, and ApplicationBuilder.get_updates_proxy documents proxy, copied from the proxy method above it. That one had to be rewrapped to stay under 99 characters.

ruff check and ruff format --check are clean on the three files with the pinned ruff==0.16.0. If the type entries are deliberate I will drop that part of the change.

@harshil21
harshil21 changed the base branch from master to doc-fixes September 1, 2026 13:39
@harshil21
harshil21 merged commit 48c0146 into python-telegram-bot:doc-fixes Sep 1, 2026
2 checks passed
@harshil21 harshil21 mentioned this pull request Sep 1, 2026
2 tasks
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants