From 9803b3f758d0ac73b08d9224286accae398fd893 Mon Sep 17 00:00:00 2001 From: darkdi Date: Fri, 7 Aug 2026 20:29:32 +0300 Subject: [PATCH 1/3] Fix docstring Args entries that name a parameter the class does not take --- src/telegram/_paidmedia.py | 4 ---- src/telegram/_passport/credentials.py | 2 -- src/telegram/ext/_applicationbuilder.py | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/telegram/_paidmedia.py b/src/telegram/_paidmedia.py index 6b9ec318fb4..07522257953 100644 --- a/src/telegram/_paidmedia.py +++ b/src/telegram/_paidmedia.py @@ -106,7 +106,6 @@ class PaidMediaPreview(PaidMedia): equality comparison now considers integer durations and equivalent timedeltas as equal. Args: - type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PREVIEW`. width (:obj:`int`, optional): Media width as defined by the sender. height (:obj:`int`, optional): Media height as defined by the sender. duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of the media in @@ -160,7 +159,6 @@ class PaidMediaPhoto(PaidMedia): .. versionadded:: 21.4 Args: - type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PHOTO`. photo (Sequence[:class:`telegram.PhotoSize`]): The photo. Attributes: @@ -194,7 +192,6 @@ class PaidMediaVideo(PaidMedia): .. versionadded:: 21.4 Args: - type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`. video (:class:`telegram.Video`): The video. Attributes: @@ -228,7 +225,6 @@ class PaidMediaLivePhoto(PaidMedia): .. versionadded:: 22.8 Args: - type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.LIVE_PHOTO` live_photo (:class:`telegram.LivePhoto`): The photo. Attributes: diff --git a/src/telegram/_passport/credentials.py b/src/telegram/_passport/credentials.py index 6252ffba0a0..91e1c6f6ca1 100644 --- a/src/telegram/_passport/credentials.py +++ b/src/telegram/_passport/credentials.py @@ -57,8 +57,6 @@ def decrypt(secret, hash, data): base64 encoded string. data (:obj:`str` or :obj:`bytes`): The data to decrypt, either as bytes or as a base64 encoded string. - file (:obj:`bool`): Force data to be treated as raw data, instead of trying to - b64decode it. Raises: :class:`PassportDecryptionError`: Given hash does not match hash of decrypted data. diff --git a/src/telegram/ext/_applicationbuilder.py b/src/telegram/ext/_applicationbuilder.py index b0417148cd2..b9074539abd 100644 --- a/src/telegram/ext/_applicationbuilder.py +++ b/src/telegram/ext/_applicationbuilder.py @@ -737,8 +737,8 @@ def get_updates_proxy( .. versionadded:: 20.7 Args: - proxy (:obj:`str` | ``httpx.Proxy`` | ``httpx.URL``): The URL to a proxy server, - a ``httpx.Proxy`` object or a ``httpx.URL`` object. See + get_updates_proxy (:obj:`str` | ``httpx.Proxy`` | ``httpx.URL``): The URL to a + proxy server, a ``httpx.Proxy`` object or a ``httpx.URL`` object. See :paramref:`telegram.request.HTTPXRequest.proxy` for more information. Returns: From ef511ea2577c7db27ae7cc283b2d5d79216d2d72 Mon Sep 17 00:00:00 2001 From: darkdi Date: Fri, 7 Aug 2026 20:30:26 +0300 Subject: [PATCH 2/3] Add change fragment --- changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml diff --git a/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml b/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml new file mode 100644 index 00000000000..d96b12300e5 --- /dev/null +++ b/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml @@ -0,0 +1,5 @@ +documentation = """Removed six \Args\ entries that named a parameter the callable does not accept: ype\ on the four \PaidMedia\ subclasses, ile\ on \decrypt\, and \proxy\ on \ApplicationBuilder.get_updates_proxy\.""" +[[pull_requests]] +uid = "5326" +author_uids = ["darkdi"] +closes_threads = [] From 4d11f52d2abd4a95b68e179740e42f810aed29db Mon Sep 17 00:00:00 2001 From: darkdi Date: Fri, 7 Aug 2026 20:30:59 +0300 Subject: [PATCH 3/3] Fix the change fragment text --- changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml b/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml index d96b12300e5..4b5349ef721 100644 --- a/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml +++ b/changes/unreleased/5326.OAIUA0X9LFJzA48BR7mpvg.toml @@ -1,4 +1,4 @@ -documentation = """Removed six \Args\ entries that named a parameter the callable does not accept: ype\ on the four \PaidMedia\ subclasses, ile\ on \decrypt\, and \proxy\ on \ApplicationBuilder.get_updates_proxy\.""" +documentation = """Removed six ``Args`` entries that named a parameter the callable does not accept: ``type`` on the four ``PaidMedia`` subclasses, ``file`` on ``decrypt``, and ``proxy`` on ``ApplicationBuilder.get_updates_proxy``.""" [[pull_requests]] uid = "5326" author_uids = ["darkdi"]