From 7c9ba1a6377cb8df3315861a6b09f3c207e5287c Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 12:13:03 +0530 Subject: [PATCH 01/14] removed git.io links in non python files --- .github/ISSUE_TEMPLATE/question.yml | 4 ++-- CHANGES.rst | 4 ++-- docs/source/_static/dark.css | 2 +- examples/README.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 84b686d10f6..c3ad2fb6df3 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -9,9 +9,9 @@ body: value: | Hey there, you have a question? We are happy to answer. Please make sure no similar question was opened already. - To make it easier for us to help you, please read this [article](https://git.io/JURJO). + To make it easier for us to help you, please read this [article](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Ask-Right). - Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://git.io/JG3rk) offer a slightly better format to discuss usage questions. + Please mind that there is also a users' [Telegram group](https://t.me/pythontelegrambotgroup) for questions about the library. Questions asked there might be answered quicker than here. Moreover, [GitHub Discussions](https://github.com/python-telegram-bot/python-telegram-bot/discussions) offer a slightly better format to discuss usage questions. - type: textarea id: issue-faced diff --git a/CHANGES.rst b/CHANGES.rst index 10b1c8708d9..42a63de1543 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -883,7 +883,7 @@ Expect minor releases soon (mainly complete Bot API 4.4 support) - Error Handler now handles all types of exceptions (`#1485`_) - Return UTC from from_timestamp() (`#1485`_) -**See the wiki page at https://git.io/fxJuV for a detailed guide on how to migrate from version 11 to version 12.** +**See the wiki page at https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-12.0 for a detailed guide on how to migrate from version 11 to version 12.** Context based callbacks (`#1100`_) ---------------------------------- @@ -1088,7 +1088,7 @@ Non Bot API 4.0 changes: .. _`#1172`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1172 .. _`#1179`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1179 .. _`#1184`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1184 -.. _`our telegram passport wiki page`: https://git.io/fAvYd +.. _`our telegram passport wiki page`: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport Version 10.1.0 ============== diff --git a/docs/source/_static/dark.css b/docs/source/_static/dark.css index f8ec9fd0876..8be80d0cc45 100644 --- a/docs/source/_static/dark.css +++ b/docs/source/_static/dark.css @@ -2,7 +2,7 @@ /* Generated by https://darkreader.org Instructions: Install the extension on a Chromium-based browser - Then do this to export the CSS: https://git.io/JOM6t and drop it here + Then do this to export the CSS: https://github.com/darkreader/darkreader/issues/604#issuecomment-661107893 and drop it here Some color values where manually changed - just search for "/*" in this file and insert them in the new css */ /* User-Agent Style */ diff --git a/examples/README.md b/examples/README.md index 617f259e30a..ace20cda903 100644 --- a/examples/README.md +++ b/examples/README.md @@ -25,7 +25,7 @@ A even more complex example of a bot that uses the nested `ConversationHandler`s A basic example of a bot store conversation state and user_data over multiple restarts. ### [`inlinekeyboard.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard.py) -This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://git.io/JOmFw. +This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example. ### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard2.py) A more complex example about inline keyboards, callback queries and message editing. This example showcases how an interactive menu could be build using inline keyboards. @@ -40,7 +40,7 @@ A basic example of an [inline bot](https://core.telegram.org/bots/inline). Don't This example sheds some light on polls, poll answers and the corresponding handlers. ### [`passportbot.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.py) -A basic example of a bot that can accept passports. Use in combination with [`passportbot.html`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.html). Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather). Check out this [guide](https://git.io/fAvYd) on Telegram passports in PTB. +A basic example of a bot that can accept passports. Use in combination with [`passportbot.html`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/passportbot.html). Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather). Check out this [guide](https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport) on Telegram passports in PTB. ### [`paymentbot.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/paymentbot.py) A basic example of a bot that can accept payments. Don't forget to enable and configure payments with [@BotFather](https://telegram.me/BotFather). From 8c306aa1f94e534b9402c16388ae068f17221abf Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 12:28:02 +0530 Subject: [PATCH 02/14] original link --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d29c4f919c6..608d095af3e 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def get_setup_kwargs(raw=False): author_email='devs@python-telegram-bot.org', license='LGPLv3', url='https://python-telegram-bot.org/', - # Keywords supported by PyPI can be found at https://git.io/JtLIZ + # Keywords supported by PyPI can be found at https://github.com/pypa/warehouse/blob/aafc5185e57e67d43487ce4faa95913dd4573e14/warehouse/templates/packaging/detail.html#L20-L58 project_urls={ "Documentation": "https://python-telegram-bot.readthedocs.io", "Bug Tracker": "https://github.com/python-telegram-bot/python-telegram-bot/issues", From e2ce884a3e011f8233c5caf0fcd17ebf096cc87d Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 13:04:53 +0530 Subject: [PATCH 03/14] changed all git.io to original links --- examples/arbitrarycallbackdatabot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/arbitrarycallbackdatabot.py b/examples/arbitrarycallbackdatabot.py index e1f19419df3..9cd61309fe1 100644 --- a/examples/arbitrarycallbackdatabot.py +++ b/examples/arbitrarycallbackdatabot.py @@ -4,7 +4,9 @@ """This example showcases how PTBs "arbitrary callback data" feature can be used. -For detailed info on arbitrary callback data, see the wiki page at https://git.io/JGBDI +For detailed info on arbitrary callback data, see the wiki page at + +https://github.com/python-telegram-bot/python-telegram-bot/wiki/Arbitrary-callback_data """ import logging from typing import List, Tuple, cast From 48c3454df232e5761d316b882d2858515597e200 Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 13:05:09 +0530 Subject: [PATCH 04/14] changed all git.io to original links --- examples/inlinekeyboard.py | 2 +- examples/passportbot.py | 3 +- telegram/_dice.py | 5 +-- telegram/ext/_builders.py | 50 +++++++++++++++++++--------- telegram/ext/_callbackcontext.py | 9 +++-- telegram/ext/_contexttypes.py | 2 +- telegram/ext/_conversationhandler.py | 7 ++-- telegram/ext/_extbot.py | 3 +- tests/test_conversationhandler.py | 3 +- 9 files changed, 56 insertions(+), 28 deletions(-) diff --git a/examples/inlinekeyboard.py b/examples/inlinekeyboard.py index 56be7a20546..d527e9071c3 100644 --- a/examples/inlinekeyboard.py +++ b/examples/inlinekeyboard.py @@ -4,7 +4,7 @@ """ Basic example for a bot that uses inline keyboards. For an in-depth explanation, check out - https://git.io/JOmFw. + https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example. """ import logging diff --git a/examples/passportbot.py b/examples/passportbot.py index 3722da781d4..69af6c1b13a 100644 --- a/examples/passportbot.py +++ b/examples/passportbot.py @@ -7,7 +7,8 @@ See https://telegram.org/blog/passport for info about what telegram passport is. -See https://git.io/fAvYd for how to use Telegram Passport properly with python-telegram-bot. +See https://github.com/python-telegram-bot/python-telegram-bot/wiki/Telegram-Passport + for how to use Telegram Passport properly with python-telegram-bot. """ import logging diff --git a/telegram/_dice.py b/telegram/_dice.py index e6eb0646b47..1f9a79c405e 100644 --- a/telegram/_dice.py +++ b/telegram/_dice.py @@ -50,8 +50,9 @@ class Dice(TelegramObject): Telegram. If :attr:`emoji` is "🎰", each value corresponds to a unique combination of symbols, which - can be found at our `wiki `_. However, this behaviour is undocumented - and might be changed by Telegram. + can be found at our `wiki `_. + However, this behaviour is undocumented and might be changed by Telegram. Args: value (:obj:`int`): Value of the dice. 1-6 for dice, darts and bowling balls, 1-5 for diff --git a/telegram/ext/_builders.py b/telegram/ext/_builders.py index de723f9fae8..5db44005c1a 100644 --- a/telegram/ext/_builders.py +++ b/telegram/ext/_builders.py @@ -626,7 +626,8 @@ def private_key( to be used for :attr:`telegram.ext.Dispatcher.bot`. .. seealso:: `passportbot.py `_, `Telegram Passports `_ + /tree/master/examples#passportbotpy>`_, `Telegram Passports `_ Args: private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the @@ -645,7 +646,8 @@ def defaults(self: BuilderType, defaults: 'Defaults') -> BuilderType: """Sets the :class:`telegram.ext.Defaults` object to be used for :attr:`telegram.ext.Dispatcher.bot`. - .. seealso:: `Adding Defaults `_ + .. seealso:: `Adding Defaults `_ Args: defaults (:class:`telegram.ext.Defaults`): The defaults. @@ -663,8 +665,10 @@ def arbitrary_callback_data( cached in memory. If not called, only strings can be used as callback data and no data will be stored in memory. - .. seealso:: `Arbitrary callback_data `_, - `arbitrarycallbackdatabot.py `_ + .. seealso:: `Arbitrary callback_data `_, + `arbitrarycallbackdatabot.py `_ Args: arbitrary_callback_data (:obj:`bool` | :obj:`int`): If :obj:`True` is passed, the @@ -750,7 +754,9 @@ def job_queue( """Sets a :class:`telegram.ext.JobQueue` instance to be used for :attr:`telegram.ext.Dispatcher.job_queue`. If not called, a job queue will be instantiated. - .. seealso:: `JobQueue `_, `timerbot.py `_ + .. seealso:: `JobQueue `_, `timerbot.py `_ Note: * :meth:`telegram.ext.JobQueue.set_dispatcher` will be called automatically by @@ -778,8 +784,10 @@ def persistence( """Sets a :class:`telegram.ext.BasePersistence` instance to be used for :attr:`telegram.ext.Dispatcher.persistence`. - .. seealso:: `Making your bot persistent `_, - `persistentconversationbot.py `_ + .. seealso:: `Making your bot persistent `_, + `persistentconversationbot.py `_ Warning: If a :class:`telegram.ext.ContextTypes` instance is set via :meth:`context_types`, @@ -801,7 +809,8 @@ def context_types( """Sets a :class:`telegram.ext.ContextTypes` instance to be used for :attr:`telegram.ext.Dispatcher.context_types`. - .. seealso:: `contexttypesbot.py `_ + .. seealso:: `contexttypesbot.py `_ Args: context_types (:class:`telegram.ext.ContextTypes`, optional): The context types. @@ -984,7 +993,8 @@ def private_key( to be used for :attr:`telegram.ext.Updater.bot`. .. seealso:: `passportbot.py `_, `Telegram Passports `_ + /tree/master/examples#passportbotpy>`_, `Telegram Passports <>`_https://github.com/python-telegram-bot\ + /python-telegram-bot/wiki/Telegram-Passport Args: private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the @@ -1003,7 +1013,8 @@ def defaults(self: BuilderType, defaults: 'Defaults') -> BuilderType: """Sets the :class:`telegram.ext.Defaults` object to be used for :attr:`telegram.ext.Updater.bot`. - .. seealso:: `Adding Defaults `_ + .. seealso:: `Adding Defaults `_ Args: defaults (:class:`telegram.ext.Defaults`): The defaults. @@ -1021,8 +1032,10 @@ def arbitrary_callback_data( cached in memory. If not called, only strings can be used as callback data and no data will be stored in memory. - .. seealso:: `Arbitrary callback_data `_, - `arbitrarycallbackdatabot.py `_ + .. seealso:: `Arbitrary callback_data `_, + `arbitrarycallbackdatabot.py `_ Args: arbitrary_callback_data (:obj:`bool` | :obj:`int`): If :obj:`True` is passed, the @@ -1111,7 +1124,9 @@ def job_queue( """Sets a :class:`telegram.ext.JobQueue` instance to be used for the :attr:`telegram.ext.Updater.dispatcher`. If not called, a job queue will be instantiated. - .. seealso:: `JobQueue `_, `timerbot.py `_, + .. seealso:: `JobQueue `_, `timerbot.py `_, :attr:`telegram.ext.Dispatcher.job_queue` Note: @@ -1140,8 +1155,10 @@ def persistence( """Sets a :class:`telegram.ext.BasePersistence` instance to be used for the :attr:`telegram.ext.Updater.dispatcher`. - .. seealso:: `Making your bot persistent `_, - `persistentconversationbot.py `_, + .. seealso:: `Making your bot persistent `_, + `persistentconversationbot.py `_, :attr:`telegram.ext.Dispatcher.persistence` Warning: @@ -1164,7 +1181,8 @@ def context_types( """Sets a :class:`telegram.ext.ContextTypes` instance to be used for the :attr:`telegram.ext.Updater.dispatcher`. - .. seealso:: `contexttypesbot.py `_, + .. seealso:: `contexttypesbot.py `_, :attr:`telegram.ext.Dispatcher.context_types`. Args: diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 0ee4913badf..8c574c33721 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -155,7 +155,8 @@ def bot_data(self) -> BD: @bot_data.setter def bot_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to bot_data, see https://git.io/Jt6ic" + "You can not assign a new value to bot_data, see" + " https://github.com/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" ) @property @@ -176,7 +177,8 @@ def chat_data(self) -> Optional[CD]: @chat_data.setter def chat_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to chat_data, see https://git.io/Jt6ic" + "You can not assign a new value to chat_data, see https://github.com/" + "python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" ) @property @@ -191,7 +193,8 @@ def user_data(self) -> Optional[UD]: @user_data.setter def user_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to user_data, see https://git.io/Jt6ic" + "You can not assign a new value to user_data, see https://github.com" + "/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" ) def refresh_data(self) -> None: diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index bc4bfe55b72..8430f5f12b1 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -53,7 +53,7 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): __slots__ = ('_context', '_bot_data', '_chat_data', '_user_data') - # overload signatures generated with https://git.io/JtJPj + # overload signatures generated with https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 @overload def __init__( diff --git a/telegram/ext/_conversationhandler.py b/telegram/ext/_conversationhandler.py index 269bfd32cb7..a8b9c95864b 100644 --- a/telegram/ext/_conversationhandler.py +++ b/telegram/ext/_conversationhandler.py @@ -92,7 +92,8 @@ class ConversationHandler(Handler[Update, CCT]): Finally, ``ConversationHandler``, does *not* handle (edited) channel posts. - .. _`FAQ`: https://git.io/JtcyU + .. _`FAQ`: https://github.com/python-telegram-bot/python-telegram-bot/wiki\ + /Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do The first collection, a ``list`` named :attr:`entry_points`, is used to initiate the conversation, for example with a :class:`telegram.ext.CommandHandler` or @@ -299,7 +300,9 @@ def __init__( # this link will be added to all warnings tied to per_* setting per_faq_link = ( - " Read this FAQ entry to learn more about the per_* settings: https://git.io/JtcyU." + " Read this FAQ entry to learn more about the per_* settings: " + "https://github.com/python-telegram-bot/python-telegram-bot/wiki" + "/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do." ) for handler in all_handlers: diff --git a/telegram/ext/_extbot.py b/telegram/ext/_extbot.py index 7898c2279d4..5aed2380bab 100644 --- a/telegram/ext/_extbot.py +++ b/telegram/ext/_extbot.py @@ -77,7 +77,8 @@ class ExtBot(Bot): arbitrary_callback_data (:obj:`bool` | :obj:`int`, optional): Whether to allow arbitrary objects as callback data for :class:`telegram.InlineKeyboardButton`. Pass an integer to specify the maximum number of objects cached in memory. For more - details, please see our `wiki `_. Defaults to :obj:`False`. + details, please see our `wiki `_. Defaults to :obj:`False`. Attributes: arbitrary_callback_data (:obj:`bool` | :obj:`int`): Whether this bot instance diff --git a/tests/test_conversationhandler.py b/tests/test_conversationhandler.py index c44df79958e..17a2d4a8937 100644 --- a/tests/test_conversationhandler.py +++ b/tests/test_conversationhandler.py @@ -1449,7 +1449,8 @@ class NotUpdate: ) per_faq_link = ( - " Read this FAQ entry to learn more about the per_* settings: https://git.io/JtcyU." + " Read this FAQ entry to learn more about the per_* settings: " + "https://github.com/python-telegram-bot/python-telegram-bot/wiki/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do." ) assert str(recwarn[4].message) == ( From c320e8c5fd728a57c38d37efe29103d56b515f75 Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 13:28:57 +0530 Subject: [PATCH 05/14] changed all git.io to original links --- telegram/_dice.py | 2 +- telegram/ext/_callbackcontext.py | 9 ++++++--- telegram/ext/_contexttypes.py | 5 ++++- tests/test_conversationhandler.py | 3 ++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/telegram/_dice.py b/telegram/_dice.py index 1f9a79c405e..b4495e862dc 100644 --- a/telegram/_dice.py +++ b/telegram/_dice.py @@ -51,7 +51,7 @@ class Dice(TelegramObject): If :attr:`emoji` is "🎰", each value corresponds to a unique combination of symbols, which can be found at our `wiki `_. + /Code-snippets#map-a-slot-machine-dice-value-to-the-corresponding-symbols>`_. However, this behaviour is undocumented and might be changed by Telegram. Args: diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 8c574c33721..73918b357da 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -156,7 +156,8 @@ def bot_data(self) -> BD: def bot_data(self, value: object) -> NoReturn: raise AttributeError( "You can not assign a new value to bot_data, see" - " https://github.com/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" + " https://github.com/python-telegram-bot/python-telegram-bot" + "/wiki/Storing-bot%2C-user-and-chat-related-data" ) @property @@ -178,7 +179,8 @@ def chat_data(self) -> Optional[CD]: def chat_data(self, value: object) -> NoReturn: raise AttributeError( "You can not assign a new value to chat_data, see https://github.com/" - "python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" + "python-telegram-bot/python-telegram-bot/wiki/" + "Storing-bot%2C-user-and-chat-related-data" ) @property @@ -194,7 +196,8 @@ def user_data(self) -> Optional[UD]: def user_data(self, value: object) -> NoReturn: raise AttributeError( "You can not assign a new value to user_data, see https://github.com" - "/python-telegram-bot/python-telegram-bot/wiki/Storing-bot%2C-user-and-chat-related-data" + "/python-telegram-bot/python-telegram-bot/wiki" + "/Storing-bot%2C-user-and-chat-related-data" ) def refresh_data(self) -> None: diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index 8430f5f12b1..0e4ed2b20cb 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -53,7 +53,10 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): __slots__ = ('_context', '_bot_data', '_chat_data', '_user_data') - # overload signatures generated with https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 + """ + overload signatures generated with + https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 + """ @overload def __init__( diff --git a/tests/test_conversationhandler.py b/tests/test_conversationhandler.py index 17a2d4a8937..0cc449f586a 100644 --- a/tests/test_conversationhandler.py +++ b/tests/test_conversationhandler.py @@ -1450,7 +1450,8 @@ class NotUpdate: per_faq_link = ( " Read this FAQ entry to learn more about the per_* settings: " - "https://github.com/python-telegram-bot/python-telegram-bot/wiki/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do." + "https://github.com/python-telegram-bot/python-telegram-bot/wiki" + "/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do." ) assert str(recwarn[4].message) == ( From cc6a663dbd7c3f342f76e229ffa8da9290c42a83 Mon Sep 17 00:00:00 2001 From: murugu-21 <60959623+murugu-21@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:30:11 +0530 Subject: [PATCH 06/14] Update examples/README.md Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index ace20cda903..b69280ce661 100644 --- a/examples/README.md +++ b/examples/README.md @@ -25,7 +25,7 @@ A even more complex example of a bot that uses the nested `ConversationHandler`s A basic example of a bot store conversation state and user_data over multiple restarts. ### [`inlinekeyboard.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard.py) -This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example. +This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives [here](https://github.com/python-telegram-bot/python-telegram-bot/wiki/InlineKeyboard-Example). ### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard2.py) A more complex example about inline keyboards, callback queries and message editing. This example showcases how an interactive menu could be build using inline keyboards. From c40ffb7a9b5f627284cfaa7680b21c6b0cb6f224 Mon Sep 17 00:00:00 2001 From: murugu-21 <60959623+murugu-21@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:30:26 +0530 Subject: [PATCH 07/14] Update telegram/ext/_builders.py Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> --- telegram/ext/_builders.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram/ext/_builders.py b/telegram/ext/_builders.py index 5db44005c1a..522188f95b5 100644 --- a/telegram/ext/_builders.py +++ b/telegram/ext/_builders.py @@ -993,8 +993,8 @@ def private_key( to be used for :attr:`telegram.ext.Updater.bot`. .. seealso:: `passportbot.py `_, `Telegram Passports <>`_https://github.com/python-telegram-bot\ - /python-telegram-bot/wiki/Telegram-Passport + /tree/master/examples#passportbotpy>`_, `Telegram Passports `_ Args: private_key (:obj:`bytes` | :obj:`str` | :obj:`pathlib.Path`): The private key or the From 77ffa83ca67d9026f1305836c05f387ad2986d40 Mon Sep 17 00:00:00 2001 From: murugu-21 <60959623+murugu-21@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:30:45 +0530 Subject: [PATCH 08/14] Update examples/arbitrarycallbackdatabot.py Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> --- examples/arbitrarycallbackdatabot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/arbitrarycallbackdatabot.py b/examples/arbitrarycallbackdatabot.py index 9cd61309fe1..3cb3e9aa9b2 100644 --- a/examples/arbitrarycallbackdatabot.py +++ b/examples/arbitrarycallbackdatabot.py @@ -5,7 +5,6 @@ """This example showcases how PTBs "arbitrary callback data" feature can be used. For detailed info on arbitrary callback data, see the wiki page at - https://github.com/python-telegram-bot/python-telegram-bot/wiki/Arbitrary-callback_data """ import logging From d0118fb45c2391c2612369554db4a258163e863a Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 15:39:55 +0530 Subject: [PATCH 09/14] harshil21 requests made --- telegram/ext/_builders.py | 2 +- telegram/ext/_contexttypes.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/telegram/ext/_builders.py b/telegram/ext/_builders.py index 5db44005c1a..7913818de27 100644 --- a/telegram/ext/_builders.py +++ b/telegram/ext/_builders.py @@ -666,7 +666,7 @@ def arbitrary_callback_data( be stored in memory. .. seealso:: `Arbitrary callback_data `_, + /python-telegram-bot/wiki/Arbitrary-callback_data>`_, `arbitrarycallbackdatabot.py `_ diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index 0e4ed2b20cb..2188a05a113 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -53,10 +53,10 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): __slots__ = ('_context', '_bot_data', '_chat_data', '_user_data') - """ - overload signatures generated with - https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 - """ + + # overload signatures generated with + # https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 + @overload def __init__( From e862141d94d169ae18bbfcc40680b66f901e043c Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 15:44:24 +0530 Subject: [PATCH 10/14] trailing white spaces fixed --- telegram/ext/_contexttypes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index 2188a05a113..f6681cfe8bc 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -53,10 +53,8 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): __slots__ = ('_context', '_bot_data', '_chat_data', '_user_data') - # overload signatures generated with - # https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 - + # https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 @overload def __init__( From 5e86aaf4dbb84b3901e93fadc277aa041292ea00 Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 15:55:19 +0530 Subject: [PATCH 11/14] trailing white space --- telegram/ext/_contexttypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index f6681cfe8bc..5f613be2456 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -54,7 +54,7 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): __slots__ = ('_context', '_bot_data', '_chat_data', '_user_data') # overload signatures generated with - # https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 + # https://gist.github.com/Bibo-Joshi/399382cda537fb01bd86b13c3d03a956 @overload def __init__( From 3c00950efdcbcbcd68b3b880a9229726435fd46d Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 16:25:16 +0530 Subject: [PATCH 12/14] Uplift link to module variable --- telegram/ext/_callbackcontext.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 73918b357da..1d6c32a9dec 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -40,6 +40,11 @@ from telegram.ext import Dispatcher, Job, JobQueue from telegram.ext._utils.types import CCT +_STORING_DATA_WIKI = ( + " https://github.com/python-telegram-bot/python-telegram-bot" + "/wiki/Storing-bot%2C-user-and-chat-related-data" + ) + class CallbackContext(Generic[BT, UD, CD, BD]): """ @@ -155,9 +160,7 @@ def bot_data(self) -> BD: @bot_data.setter def bot_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to bot_data, see" - " https://github.com/python-telegram-bot/python-telegram-bot" - "/wiki/Storing-bot%2C-user-and-chat-related-data" + f"You can not assign a new value to bot_data, see {_STORING_DATA_WIKI}" ) @property @@ -178,9 +181,7 @@ def chat_data(self) -> Optional[CD]: @chat_data.setter def chat_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to chat_data, see https://github.com/" - "python-telegram-bot/python-telegram-bot/wiki/" - "Storing-bot%2C-user-and-chat-related-data" + f"You can not assign a new value to chat_data, see {_STORING_DATA_WIKI}" ) @property @@ -195,9 +196,7 @@ def user_data(self) -> Optional[UD]: @user_data.setter def user_data(self, value: object) -> NoReturn: raise AttributeError( - "You can not assign a new value to user_data, see https://github.com" - "/python-telegram-bot/python-telegram-bot/wiki" - "/Storing-bot%2C-user-and-chat-related-data" + f"You can not assign a new value to user_data, see {_STORING_DATA_WIKI}" ) def refresh_data(self) -> None: From 4b8f124e08394201d50d8a86fec42b4bc64a5841 Mon Sep 17 00:00:00 2001 From: murugappan m Date: Fri, 21 Jan 2022 16:50:32 +0530 Subject: [PATCH 13/14] indent issue fixed --- telegram/ext/_callbackcontext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 1d6c32a9dec..3cc52b403d2 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -41,9 +41,9 @@ from telegram.ext._utils.types import CCT _STORING_DATA_WIKI = ( - " https://github.com/python-telegram-bot/python-telegram-bot" - "/wiki/Storing-bot%2C-user-and-chat-related-data" - ) + " https://github.com/python-telegram-bot/python-telegram-bot" + "/wiki/Storing-bot%2C-user-and-chat-related-data" +) class CallbackContext(Generic[BT, UD, CD, BD]): From 9c79eeb091d8112be6015270cb987ca266b493e9 Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Fri, 21 Jan 2022 14:24:15 +0100 Subject: [PATCH 14/14] tiny edit --- telegram/ext/_callbackcontext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 3cc52b403d2..4663243a740 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -41,7 +41,7 @@ from telegram.ext._utils.types import CCT _STORING_DATA_WIKI = ( - " https://github.com/python-telegram-bot/python-telegram-bot" + "https://github.com/python-telegram-bot/python-telegram-bot" "/wiki/Storing-bot%2C-user-and-chat-related-data" )