instruction
stringclasses
100 values
code
stringlengths
78
193k
response
stringlengths
259
170k
file
stringlengths
59
203
Add detailed docstrings explaining each function
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains the classes for Telegram Stars Revenue Withdrawals.""" import datetime as dtm from typing...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/stars/revenuewithdrawalstate.py
Document all endpoints with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an objects that are related to Telegram giveaways.""" import datetime as dtm from collections.abc import Sequence @@ -33,6...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_giveaway.py
Add docstrings that explain purpose and usage
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram OrderInfo.""" from typing import TYPE_CHECKING @@ -29,6 +30,25 @@ class OrderInf...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/orderinfo.py
Insert docstrings into my code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,28 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that describes a price change of a paid message.""" from telegram._telegramobject import TelegramObject from te...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_paidmessagepricechanged.py
Write reusable docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram MessageReaction Update.""" import datetime as dtm from collections.abc import Sequenc...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_messagereactionupdated.py
Auto-generate documentation strings for this file
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,42 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram user rating.""" from telegram._telegramobject import TelegramObject from telegram._...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_userrating.py
Add documentation for all methods
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a class that represents a Telegram InputInvoiceMessageContent.""" from collections.abc import Sequence from typing import ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_inline/inputinvoicemessagecontent.py
Add docstrings to make code maintainable
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,9 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a change in the Telegram message auto +deletion. +""" import datetime as dtm @@ -26,6 +29,28 @@...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_messageautodeletetimerchanged.py
Fully document this Python code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,13 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to enums. + +Warning: + Contents of this module are intended to be used internally by the library...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/enum.py
Insert docstrings into my code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains objects related to Telegram suggested posts.""" import datetime as dtm from typing import TYPE_CHECKING, Final, Optional @...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_suggestedpost.py
Write docstrings describing each step
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,13 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains auxiliary functionality for parsing MessageEntity objects. + +Warning: + Contents of this module are intended to be used i...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/entities.py
Generate docstrings for script automation
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,11 +16,25 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a helper function for Telegram's ReplyMarkups + +.. versionchanged:: 20.0 + Previously, the contents of this module were a...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/markup.py
Generate docstrings with examples
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""Base class for Telegram Objects.""" import contextlib import datetime as dtm @@ -41,6 +42,41 @@ class TelegramObject: + """Base class fo...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_telegramobject.py
Write reusable docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,13 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to parsing arguments for classes and methods. + +Warning: + Contents of this module are intended ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/argumentparsing.py
Generate docstrings for script automation
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,14 +16,35 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to logging. + +Warning: + Contents of this module are intended to be used internally by the libr...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/logging.py
Add docstrings for utility scripts
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object related to a Telegram Story.""" from typing import TYPE_CHECKING @@ -29,6 +30,26 @@ class Story(TelegramObj...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_story.py
Turn comments into proper docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,17 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the DefaultValue class. + +.. versionchanged:: 20.0 + Previously, the contents of this module were available through the (n...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/defaultvalue.py
Document functions with detailed explanations
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,17 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to handling of files. + +.. versionchanged:: 20.0 + Previously, the contents of this module were a...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/files.py
Add docstrings that explain logic
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -15,12 +15,52 @@ # GNU Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License +"""This module contains a class that represents a Telegram SwitchInlineQueryChosenChat.""" from telegram._telegramobject import TelegramObject from telegram._utils.types ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_switchinlinequerychosenchat.py
Generate docstrings for exported functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,13 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a helper functions related to string manipulation. + +Warning: + Contents of this module are intended to be used internall...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/strings.py
Annotate my code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,17 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to datetime and timestamp conversations. + +.. versionchanged:: 20.0 + Previously, the contents of...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/datetime.py
Add docstrings to improve collaboration
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,11 +16,25 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains auxiliary functionality for building strings for __repr__ method. + +Warning: + Contents of this module are intended to b...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/repr.py
Write docstrings for backend logic
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,14 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""Helper utilities around Telegram Objects first_name, last_name and username. +.. versionadded:: 22.4 + +Warning: + Contents of this module are ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/usernames.py
Can you add docstrings to this Python file?
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,38 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram WebAppData.""" from telegram._telegramobject import TelegramObject from telegram._u...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_webappdata.py
Add docstrings including usage examples
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram WebhookInfo.""" import datetime as dtm from collections.abc import Sequence @@ -31,6 ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_webhookinfo.py
Add docstrings to meet PEP guidelines
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains the classes for Telegram Stars transactions.""" import datetime as dtm from collections.a...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/stars/startransactions.py
Generate docstrings for each module
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,34 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Web App Info.""" from telegram._telegramobject import TelegramObject from telegram....
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_webappinfo.py
Generate docstrings for each module
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the Builder classes for the telegram.ext module.""" from asyncio import Queue from collections.abc import Callable, Collec...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_applicationbuilder.py
Create docstrings for reusable components
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains objects related to Telegram video chats.""" import datetime as dtm from collections.abc import Sequence @@ -36,6 +37,14 @@...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_videochat.py
Write beginner-friendly docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,16 +16,25 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram InputMessageContent.""" from telegram._telegramobject import TelegramObject from tel...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_inline/inputmessagecontent.py
Improve documentation using docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the LinkPreviewOptions class.""" from telegram._telegramobject import TelegramObject from telegram._utils.defaultvalue imp...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_linkpreviewoptions.py
Add structured docstrings to improve clarity
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the BaseProcessor class.""" from abc import ABC, abstractmethod from contextlib import AbstractAsyncContextManager @@ -31,...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_baseupdateprocessor.py
Write docstrings for this repository
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published...
--- +++ @@ -16,6 +16,9 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an implementation of the BaseRateLimiter class based on the aiolimiter +library. +""" import asyncio import contextlib @...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_aioratelimiter.py
Document this script properly
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,13 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains functionality used for transition warnings issued by this library. + +It was created to prevent circular imports that would b...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/warnings_transition.py
Add docstrings that explain inputs and outputs
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Invoice.""" from typing import Final @@ -25,6 +26,41 @@ class Invoice(TelegramOb...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/invoice.py
Add docstrings with type hints explained
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram InputLocationMessageContent.""" import datetime as dtm from typing import Final @@ -29...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_inline/inputlocationmessagecontent.py
Fully document this Python code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the CallbackDataCache class.""" import datetime as dtm import time @@ -44,6 +45,24 @@ class InvalidCallbackData(Tele...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_callbackdatacache.py
Help me add docstrings to my project
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,56 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains objects related to the write access allowed service message.""" from telegram._telegramobject import TelegramObject from...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_writeaccessallowed.py
Generate docstrings with examples
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,15 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to warnings issued by the library. + +.. versionadded:: 20.0 + +Warning: + Contents of this modul...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_utils/warnings.py
Provide docstrings following PEP 257
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a class that allows to rate limit requests to the Bot API.""" from abc import ABC, abstractmethod from collections.abc i...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_baseratelimiter.py
Generate descriptive docstrings automatically
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the auxiliary class ContextTypes.""" from typing import Any, Generic, overload @@ -27,6 +28,37 @@ class ContextTypes(...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_contexttypes.py
Write docstrings describing each step
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the DictPersistence class.""" import json from copy import deepcopy @@ -29,6 +30,53 @@ class DictPersistence(BasePersi...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_dictpersistence.py
Generate helpful docstrings for debugging
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the class Defaults, which allows passing default values to Application.""" import datetime as dtm from typing import TYPE_...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_defaults.py
Can you add docstrings to this Python file?
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the BusinessConnectionHandler class.""" from typing import TypeVar @@ -30,6 +31,34 @@ class BusinessConnectionHandler...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/businessconnectionhandler.py
Generate docstrings for exported functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the base class for handlers as used by the Application.""" from abc import ABC, abstractmethod from typing import TYPE_CHE...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/basehandler.py
Add minimal docstrings for each function
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the BusinessMessagesDeletedHandler class.""" from typing import TypeVar @@ -30,6 +31,34 @@ class BusinessMessagesDele...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/businessmessagesdeletedhandler.py
Write reusable docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the CallbackQueryHandler class.""" import asyncio import re @@ -36,6 +37,93 @@ class CallbackQueryHandler(BaseHandler[...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/callbackqueryhandler.py
Write reusable docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,69 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram LoginUrl.""" from telegram._telegramobject import TelegramObject from telegram._uti...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_loginurl.py
Add docstrings for better understanding
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the ChatBoostHandler class.""" from typing import Final @@ -26,6 +27,47 @@ class ChatBoostHandler(BaseHandler[Update,...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/chatboosthandler.py
Add docstrings for utility scripts
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains objects related to Telegram menu buttons.""" from typing import TYPE_CHECKING, Final @@ -31,6 +32,28 @@ class MenuBut...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_menubutton.py
Add inline docstrings for readability
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the InlineQueryHandler class.""" import re from re import Match, Pattern @@ -34,6 +35,56 @@ class InlineQueryHandler(B...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/inlinequeryhandler.py
Add docstrings that explain inputs and outputs
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains the classes for Telegram Stars transaction partners.""" from collections.abc import Sequen...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/stars/transactionpartner.py
Add docstrings that explain logic
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Proximity Alert.""" from typing import TYPE_CHECKING @@ -29,6 +30,24 @@ class Pr...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_proximityalerttriggered.py
Write docstrings for utility functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the CommandHandler class.""" import re from typing import TYPE_CHECKING, Any, TypeVar @@ -34,6 +35,92 @@ class Command...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/commandhandler.py
Add docstrings to improve code quality
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the MessageReactionHandler class.""" from typing import Final @@ -28,6 +29,68 @@ class MessageReactionHandler(BaseHan...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/messagereactionhandler.py
Add missing documentation to my Python functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Poll.""" import datetime as dtm from collections.abc import Sequence @@ -47,6 +48,38 ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_poll.py
Help me document legacy Python code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the StringRegexHandler class.""" import re from re import Match, Pattern @@ -33,6 +34,43 @@ class StringRegexHandler(B...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/stringregexhandler.py
Create docstrings for API functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the StringCommandHandler class.""" from typing import TYPE_CHECKING, Any @@ -29,6 +30,43 @@ class StringCommandHandle...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/stringcommandhandler.py
Generate docstrings for script automation
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the PicklePersistence class.""" import pickle from collections.abc import Callable @@ -37,17 +38,30 @@ def _all_subcla...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_picklepersistence.py
Improve documentation using docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the ConversationHandler.""" import asyncio import datetime as dtm @@ -49,6 +50,9 @@ @dataclass class _ConversationTimeo...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/conversationhandler.py
Write docstrings for backend logic
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the ChosenInlineResultHandler class.""" import re from re import Match, Pattern @@ -34,6 +35,45 @@ class ChosenInlineR...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/choseninlineresulthandler.py
Write Python docstrings for this snippet
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram SuccessfulPayment.""" import datetime as dtm from typing import TYPE_CHECKING @@ -31,...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_payment/successfulpayment.py
Add docstrings to my Python code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the MessageHandler class.""" from typing import TYPE_CHECKING, Any, TypeVar @@ -33,6 +34,44 @@ class MessageHandler(B...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/messagehandler.py
Document this module using docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes JobQueue and Job.""" import asyncio import datetime as dtm @@ -52,10 +53,62 @@ def _get_callback_name(call...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_jobqueue.py
Add docstrings including usage examples
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,25 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to the std-lib asyncio module. + +.. versionadded:: 21.11 + +Warning: + Contents of this module ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/asyncio.py
Create documentation for each function signature
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the TypeHandler class.""" from typing import TypeVar @@ -32,6 +33,42 @@ class TypeHandler(BaseHandler[UT, CCT, RT]): ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/typehandler.py
Add docstrings to my Python code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the ChatMemberHandler class.""" from typing import Final, TypeVar @@ -30,6 +31,49 @@ class ChatMemberHandler(BaseHand...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_handlers/chatmemberhandler.py
Write documentation strings for class attributes
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,11 +16,21 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to parsing updates and their contents. + +.. versionadded:: 20.8 + +Warning: + Contents of this ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/_update_parsing.py
Add docstrings following best practices
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains objects that represents a Telegram ReactionType.""" from typing import TYPE_CHECKING, Fin...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_reaction.py
Add docstrings following best practices
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the class Updater, which tries to make creating Telegram bots intuitive.""" import asyncio import contextlib @@ -51,6 +52,...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_updater.py
Add docstrings for utility scripts
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,15 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains helper functions related to inspecting the program stack. + +.. versionadded:: 20.0 + +Warning: + Contents of this module ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/stack.py
Add detailed documentation for each class
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,20 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a network retry loop implementation. +Its specifically tailored to handling the Telegram API and its errors. + +.. versionadd...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/networkloop.py
Add inline docstrings for readability
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,15 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a mutable mapping that keeps track of the keys that where accessed. + +.. versionadded:: 20.0 + +Warning: + Contents of th...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/trackingdict.py
Auto-generate documentation strings for this file
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,28 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +""" +This module contains filters for use with :class:`telegram.ext.MessageHandler`, +:class:`telegram.ext.CommandHandler`, or :class:`telegram.ext.P...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/filters.py
Add professional docstrings to my codebase
from __future__ import division import numpy as np __author__ = "Eric Chiang" __email__ = "eric[at]yhathq.com" """ Measurements inspired by Philip Tetlock's "Expert Political Judgment" Equations take from Yaniv, Yates, & Smith (1991): "Measures of Descrimination Skill in Probabilistic Judgement" """ def calib...
--- +++ @@ -15,6 +15,24 @@ def calibration(prob,outcome,n_bins=10): + """Calibration measurement for a set of predictions. + + When predicting events at a given probability, how far is frequency + of positive outcomes from that probability? + NOTE: Lower scores are better + + prob: array_like, float ...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/analyses/churn_measurements.py
Help me write clear docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,12 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains convenience helper functions. + +.. versionchanged:: 20.0 + Previously, the contents of this module were available through ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/helpers.py
Generate docstrings for this script
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an abstract class to make POST and GET requests.""" import abc import json @@ -51,6 +52,39 @@ AbstractAsyncContextMana...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/request/_baserequest.py
Add well-formatted docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains a class that describes a single parameter of a request to the Bot API.""" import datetime as dtm import json @@ -37,6 +3...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/request/_requestparameter.py
Add documentation for all methods
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains methods to make POST and GET requests using the httpx library.""" from collections.abc import Collection from typing impor...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/request/_httpxrequest.py
Generate descriptive docstrings automatically
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Update.""" from typing import TYPE_CHECKING, Final @@ -43,6 +44,238 @@ class Upd...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_update.py
Add standardized docstrings across the file
#!/usr/bin/env python # pylint: disable=redefined-builtin # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Les...
--- +++ @@ -17,6 +17,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram User.""" import datetime as dtm from collections.abc import Sequence @@ -73,6 +74,101...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_user.py
Write beginner-friendly docstrings
#!/usr/bin/env python # # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by...
--- +++ @@ -17,6 +17,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/] +"""This module contains classes related to unique gifs.""" import datetime as dtm from collections.abc import Sequence @@ -36,6 +37,36 @@ class...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_uniquegift.py
Document helper functions with docstrings
#! /usr/bin/env python # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # ...
--- +++ @@ -15,16 +15,32 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains classes used for warnings issued by this library. + +.. versionadded:: 20.0 +""" __all__ = ["PTBDeprecationWarning", "PTB...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/warnings.py
Add verbose docstrings with examples
import numpy as np import re import itertools from collections import Counter """ Original taken from https://github.com/dennybritz/cnn-text-classification-tf """ def clean_str(string): string = re.sub(r"[^A-Za-z0-9(),!?\'\`]", " ", string) string = re.sub(r"\'s", " \'s", string) string = re.sub(r"\'ve", "...
--- +++ @@ -7,6 +7,10 @@ """ def clean_str(string): + """ + Tokenization/string cleaning for all datasets except for SST. + Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py + """ string = re.sub(r"[^A-Za-z0-9(),!?\'\`]", " ", string) string = re.sub(r"\'s"...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/deep-learning/keras-tutorial/data_helpers.py
Write docstrings for data processing functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -50,6 +50,7 @@ class WebhookServer: + """Thin wrapper around ``tornado.httpserver.HTTPServer``.""" __slots__ = ( "_http_server", @@ -108,6 +109,7 @@ class WebhookAppClass(tornado.web.Application): + """Application used in the Webserver""" def __init__( self, @@ -...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_utils/webhookhandler.py
Add docstrings to my Python code
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,49 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram ReplyKeyboardRemove.""" from telegram._telegramobject import TelegramObject from te...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_replykeyboardremove.py
Annotate my code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram UserProfileAudios.""" from collections.abc import Sequence from typing import TYPE_CH...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_userprofileaudios.py
Add docstrings to existing functions
import numpy from six.moves import xrange def scale_to_unit_interval(ndar, eps=1e-8): ndar = ndar.copy() ndar -= ndar.min() ndar *= 1.0 / (ndar.max() + eps) return ndar def tile_raster_images(X, img_shape, tile_shape, tile_spacing=(0, 0), scale_rows_to_unit_interval=True, ...
--- +++ @@ -1,3 +1,10 @@+""" This file contains different utility functions that are not connected +in anyway to the networks presented in the tutorials, but rather help in +processing the outputs into a more understandable way. + +For example ``tile_raster_images`` helps in generating a easy to grasp +image from a set...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/deep-learning/theano-tutorial/intro_theano/utils.py
Document this script properly
import theano import theano.tensor as T import numpy as np probabilities = T.vector() nb_samples = T.iscalar() rng = T.shared_randomstreams.RandomStreams(1234) def sample_from_pvect(pvect): onehot_sample = rng.multinomial(n=1, pvals=pvect) sample = onehot_sample.argmax() return sample def set_p_to_zer...
--- +++ @@ -9,12 +9,21 @@ def sample_from_pvect(pvect): + """ Provided utility function: given a symbolic vector of + probabilities (which MUST sum to 1), sample one element + and return its index. + """ onehot_sample = rng.multinomial(n=1, pvals=pvect) sample = onehot_sample.argmax() ret...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/deep-learning/theano-tutorial/scan_tutorial/scan_ex2_solution.py
Add docstrings with type hints explained
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np import warnings from keras.models import Model from keras.layers import Flatten, Dense, Input from keras.layers import Convolution2D, MaxPooling2D from keras.preprocessing import image from keras.utils.layer_utils import convert_all_kern...
--- +++ @@ -1,4 +1,11 @@ # -*- coding: utf-8 -*- +'''VGG19 model for Keras. + +# Reference: + +- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://arxiv.org/abs/1409.1556) + +''' from __future__ import print_function import numpy as np @@ -21,6 +28,29 @@ def VGG19(include_top=True, weig...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/deep-learning/keras-tutorial/deep_learning_models/vgg19.py
Add detailed documentation for each class
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram UserProfilePhotos.""" from collections.abc import Sequence from typing import TYPE_CH...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_userprofilephotos.py
Document my Python code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram ReplyKeyboardMarkup.""" from collections.abc import Sequence from typing import Final...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_replykeyboardmarkup.py
Turn comments into proper docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This modules contains objects that represents Telegram Replies""" from collections.abc import Sequence from typing import TYPE_CHECKING @@ -53,...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_reply.py
Improve documentation using docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the Application class.""" import asyncio import contextlib @@ -84,6 +85,28 @@ class ApplicationHandlerStop(Exception):...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_application.py
Add docstrings that explain inputs and outputs
import collections import numpy as np def mackey_glass(sample_len=1000, tau=17, seed=None, n_samples = 1): delta_t = 10 history_len = tau * delta_t # Initial conditions for the history of the system timeseries = 1.2 if seed is not None: np.random.seed(seed) samples = [] for...
--- +++ @@ -3,6 +3,16 @@ def mackey_glass(sample_len=1000, tau=17, seed=None, n_samples = 1): + ''' + mackey_glass(sample_len=1000, tau=17, seed = None, n_samples = 1) -> input + Generate the Mackey Glass time-series. Parameters are: + - sample_len: length of the time-series in timesteps. Default is...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/deep-learning/theano-tutorial/rnn_tutorial/synthetic.py
Help me write clear docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the CallbackContext class.""" from collections.abc import Awaitable, Generator from re import Match @@ -43,6 +44,74 @@ ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/ext/_callbackcontext.py
Add docstrings that explain logic
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,11 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains classes that represent Telegram errors. + +.. versionchanged:: 20.0 + Replaced ``Unauthorized`` by :class:`Forbidden`. +""...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/error.py
Write clean docstrings for readability
from __future__ import print_function import math import numpy as np import nsfg import thinkstats2 import thinkplot def MakeFrames(): preg = nsfg.ReadFemPreg() live = preg[preg.outcome == 1] firsts = live[live.birthord == 1] others = live[live.birthord != 1] assert len(live) == 9148 asse...
--- +++ @@ -1,3 +1,9 @@+"""This file contains code used in "Think Stats", +by Allen B. Downey, available from greenteapress.com + +Copyright 2014 Allen B. Downey +License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html +""" from __future__ import print_function @@ -10,6 +16,10 @@ def MakeFrames(): + """Read...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/scipy/first.py
Write docstrings for utility functions
# python-telegram-bot - a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # by the python-telegram-bot contributors <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free ...
--- +++ @@ -14,6 +14,24 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains several constants that are relevant for working with the Bot API. + +Unless noted otherwise, all constants in this module wer...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/constants.py
Write beginner-friendly docstrings
from __future__ import division, print_function print(__doc__) # Author: Peter Prettenhoer <peter.prettenhofer@gmail.com> # # License: BSD 3 clause import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.backends.backend_tkagg import NavigationToolba...
--- +++ @@ -1,3 +1,18 @@+""" +========== +Libsvm GUI +========== + +A simple graphical frontend for Libsvm mainly intended for didactic +purposes. You can create data points by point and click and visualize +the decision region induced by different kernels and parameter settings. + +To create positive examples click th...
https://raw.githubusercontent.com/donnemartin/data-science-ipython-notebooks/HEAD/scikit-learn/fig_code/svm_gui.py