Mark Internal Modules As Private (#2687)

Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
This commit is contained in:
Kenneth Cheo 2021-10-10 21:10:21 +08:00 committed by Hinrich Mahler
parent 7afce46d9f
commit 5275c45199
183 changed files with 481 additions and 525 deletions

View file

@ -71,7 +71,7 @@ Here's how to make a one-off code change.
- Your code should adhere to the `PEP 8 Style Guide`_, with the exception that we have a maximum line length of 99. - Your code should adhere to the `PEP 8 Style Guide`_, with the exception that we have a maximum line length of 99.
- Provide static typing with signature annotations. The documentation of `MyPy`_ will be a good start, the cheat sheet is `here`_. We also have some custom type aliases in ``telegram.utils.helpers.typing``. - Provide static typing with signature annotations. The documentation of `MyPy`_ will be a good start, the cheat sheet is `here`_. We also have some custom type aliases in ``telegram._utils.types``.
- Document your code. This step is pretty important to us, so it has its own `section`_. - Document your code. This step is pretty important to us, so it has its own `section`_.

3
.gitignore vendored
View file

@ -69,6 +69,9 @@ target/
# Sublime Text 2 # Sublime Text 2
*.sublime* *.sublime*
# VS Code
.vscode
# unitests files # unitests files
game.gif game.gif
telegram.mp3 telegram.mp3

View file

@ -68,6 +68,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Joscha Götzer <https://github.com/Rostgnom>`_ - `Joscha Götzer <https://github.com/Rostgnom>`_
- `jossalgon <https://github.com/jossalgon>`_ - `jossalgon <https://github.com/jossalgon>`_
- `JRoot3D <https://github.com/JRoot3D>`_ - `JRoot3D <https://github.com/JRoot3D>`_
- `kennethcheo <https://github.com/kennethcheo>`_
- `Kirill Vasin <https://github.com/vasinkd>`_ - `Kirill Vasin <https://github.com/vasinkd>`_
- `Kjwon15 <https://github.com/kjwon15>`_ - `Kjwon15 <https://github.com/kjwon15>`_
- `Li-aung Yip <https://github.com/LiaungYip>`_ - `Li-aung Yip <https://github.com/LiaungYip>`_

View file

@ -56,12 +56,3 @@ Arbitrary Callback Data
telegram.ext.callbackdatacache telegram.ext.callbackdatacache
telegram.ext.invalidcallbackdata telegram.ext.invalidcallbackdata
utils
-----
.. toctree::
telegram.ext.utils.promise
telegram.ext.utils.stack
telegram.ext.utils.types

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/utils/promise.py
telegram.ext.utils.promise.Promise
==================================
.. autoclass:: telegram.ext.utils.promise.Promise
:members:
:show-inheritance:

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/utils/types.py
telegram.ext.utils.types Module
================================
.. automodule:: telegram.ext.utils.types
:members:
:show-inheritance:

View file

@ -181,14 +181,3 @@ Auxiliary modules
telegram.helpers telegram.helpers
telegram.request telegram.request
telegram.warnings telegram.warnings
utils
-----
.. toctree::
telegram.utils.datetime
telegram.utils.defaultvalue
telegram.utils.files
telegram.utils.types
telegram.utils.warnings

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/datetime.py
telegram.utils.datetime Module
==============================
.. automodule:: telegram.utils.datetime
:members:
:show-inheritance:

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/defaultvalue.py
telegram.utils.defaultvalue Module
==================================
.. automodule:: telegram.utils.defaultvalue
:members:
:show-inheritance:

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/files.py
telegram.utils.files Module
===========================
.. automodule:: telegram.utils.files
:members:
:show-inheritance:

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/types.py
telegram.utils.types Module
===========================
.. automodule:: telegram.utils.types
:members:
:show-inheritance:

View file

@ -1,8 +0,0 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/warnings.py
telegram.utils.warnings Module
==============================
.. automodule:: telegram.utils.warnings
:members:
:show-inheritance:

View file

@ -61,11 +61,11 @@ ignore_errors = True
# Disable strict optional for telegram objects with class methods # Disable strict optional for telegram objects with class methods
# We don't want to clutter the code with 'if self.bot is None: raise RuntimeError()' # We don't want to clutter the code with 'if self.bot is None: raise RuntimeError()'
[mypy-telegram.callbackquery,telegram.chat,telegram.message,telegram.user,telegram.files.*,telegram.inline.inlinequery,telegram.payment.precheckoutquery,telegram.payment.shippingquery,telegram.passport.passportdata,telegram.passport.credentials,telegram.passport.passportfile,telegram.ext.filters,telegram.chatjoinrequest] [mypy-telegram._callbackquery,telegram._chat,telegram._message,telegram._user,telegram._files.*,telegram._inline.inlinequery,telegram._payment.precheckoutquery,telegram._payment.shippingquery,telegram._passport.passportdata,telegram._passport.credentials,telegram._passport.passportfile,telegram.ext.filters,telegram._chatjoinrequest]
strict_optional = False strict_optional = False
# type hinting for asyncio in webhookhandler is a bit tricky because it depends on the OS # type hinting for asyncio in webhookhandler is a bit tricky because it depends on the OS
[mypy-telegram.ext.utils.webhookhandler] [mypy-telegram.ext._utils.webhookhandler]
warn_unused_ignores = False warn_unused_ignores = False
[mypy-urllib3.*] [mypy-urllib3.*]

View file

@ -49,7 +49,7 @@ def get_setup_kwargs(raw=False):
raw_ext = "-raw" if raw else "" raw_ext = "-raw" if raw else ""
readme = Path(f'README{"_RAW" if raw else ""}.rst') readme = Path(f'README{"_RAW" if raw else ""}.rst')
with Path('telegram/version.py').open() as fh: with Path('telegram/_version.py').open() as fh:
for line in fh.readlines(): for line in fh.readlines():
if line.startswith('__version__'): if line.startswith('__version__'):
exec(line) exec(line)
@ -76,7 +76,6 @@ def get_setup_kwargs(raw=False):
long_description=readme.read_text(), long_description=readme.read_text(),
long_description_content_type='text/x-rst', long_description_content_type='text/x-rst',
packages=packages, packages=packages,
install_requires=requirements, install_requires=requirements,
extras_require={ extras_require={
'json': 'ujson', 'json': 'ujson',
@ -99,7 +98,7 @@ def get_setup_kwargs(raw=False):
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
], ],
python_requires='>=3.7' python_requires='>=3.7',
) )
return kwargs return kwargs

View file

@ -18,15 +18,15 @@
# along with this program. If not, see [http://www.gnu.org/licenses/]. # along with this program. If not, see [http://www.gnu.org/licenses/].
"""A library that provides a Python interface to the Telegram Bot API""" """A library that provides a Python interface to the Telegram Bot API"""
from .telegramobject import TelegramObject from ._telegramobject import TelegramObject
from .botcommand import BotCommand from ._botcommand import BotCommand
from .user import User from ._user import User
from .files.chatphoto import ChatPhoto from ._files.chatphoto import ChatPhoto
from .chat import Chat from ._chat import Chat
from .chatlocation import ChatLocation from ._chatlocation import ChatLocation
from .chatinvitelink import ChatInviteLink from ._chatinvitelink import ChatInviteLink
from .chatjoinrequest import ChatJoinRequest from ._chatjoinrequest import ChatJoinRequest
from .chatmember import ( from ._chatmember import (
ChatMember, ChatMember,
ChatMemberOwner, ChatMemberOwner,
ChatMemberAdministrator, ChatMemberAdministrator,
@ -35,95 +35,95 @@ from .chatmember import (
ChatMemberLeft, ChatMemberLeft,
ChatMemberBanned, ChatMemberBanned,
) )
from .chatmemberupdated import ChatMemberUpdated from ._chatmemberupdated import ChatMemberUpdated
from .chatpermissions import ChatPermissions from ._chatpermissions import ChatPermissions
from .files.photosize import PhotoSize from ._files.photosize import PhotoSize
from .files.audio import Audio from ._files.audio import Audio
from .files.voice import Voice from ._files.voice import Voice
from .files.document import Document from ._files.document import Document
from .files.animation import Animation from ._files.animation import Animation
from .files.sticker import Sticker, StickerSet, MaskPosition from ._files.sticker import Sticker, StickerSet, MaskPosition
from .files.video import Video from ._files.video import Video
from .files.contact import Contact from ._files.contact import Contact
from .files.location import Location from ._files.location import Location
from .files.venue import Venue from ._files.venue import Venue
from .files.videonote import VideoNote from ._files.videonote import VideoNote
from .chataction import ChatAction from ._chataction import ChatAction
from .dice import Dice from ._dice import Dice
from .userprofilephotos import UserProfilePhotos from ._userprofilephotos import UserProfilePhotos
from .keyboardbuttonpolltype import KeyboardButtonPollType from ._keyboardbuttonpolltype import KeyboardButtonPollType
from .keyboardbutton import KeyboardButton from ._keyboardbutton import KeyboardButton
from .replymarkup import ReplyMarkup from ._replymarkup import ReplyMarkup
from .replykeyboardmarkup import ReplyKeyboardMarkup from ._replykeyboardmarkup import ReplyKeyboardMarkup
from .replykeyboardremove import ReplyKeyboardRemove from ._replykeyboardremove import ReplyKeyboardRemove
from .forcereply import ForceReply from ._forcereply import ForceReply
from .files.inputfile import InputFile from ._files.inputfile import InputFile
from .files.file import File from ._files.file import File
from .parsemode import ParseMode from ._parsemode import ParseMode
from .messageentity import MessageEntity from ._messageentity import MessageEntity
from .messageid import MessageId from ._messageid import MessageId
from .games.game import Game from ._games.game import Game
from .poll import Poll, PollOption, PollAnswer from ._poll import Poll, PollOption, PollAnswer
from .voicechat import ( from ._voicechat import (
VoiceChatStarted, VoiceChatStarted,
VoiceChatEnded, VoiceChatEnded,
VoiceChatParticipantsInvited, VoiceChatParticipantsInvited,
VoiceChatScheduled, VoiceChatScheduled,
) )
from .loginurl import LoginUrl from ._loginurl import LoginUrl
from .proximityalerttriggered import ProximityAlertTriggered from ._proximityalerttriggered import ProximityAlertTriggered
from .games.callbackgame import CallbackGame from ._games.callbackgame import CallbackGame
from .payment.shippingaddress import ShippingAddress from ._payment.shippingaddress import ShippingAddress
from .payment.orderinfo import OrderInfo from ._payment.orderinfo import OrderInfo
from .payment.successfulpayment import SuccessfulPayment from ._payment.successfulpayment import SuccessfulPayment
from .payment.invoice import Invoice from ._payment.invoice import Invoice
from .passport.credentials import EncryptedCredentials from ._passport.credentials import EncryptedCredentials
from .passport.passportfile import PassportFile from ._passport.passportfile import PassportFile
from .passport.data import IdDocumentData, PersonalDetails, ResidentialAddress from ._passport.data import IdDocumentData, PersonalDetails, ResidentialAddress
from .passport.encryptedpassportelement import EncryptedPassportElement from ._passport.encryptedpassportelement import EncryptedPassportElement
from .passport.passportdata import PassportData from ._passport.passportdata import PassportData
from .inline.inlinekeyboardbutton import InlineKeyboardButton from ._inline.inlinekeyboardbutton import InlineKeyboardButton
from .inline.inlinekeyboardmarkup import InlineKeyboardMarkup from ._inline.inlinekeyboardmarkup import InlineKeyboardMarkup
from .messageautodeletetimerchanged import MessageAutoDeleteTimerChanged from ._messageautodeletetimerchanged import MessageAutoDeleteTimerChanged
from .message import Message from ._message import Message
from .callbackquery import CallbackQuery from ._callbackquery import CallbackQuery
from .choseninlineresult import ChosenInlineResult from ._choseninlineresult import ChosenInlineResult
from .inline.inputmessagecontent import InputMessageContent from ._inline.inputmessagecontent import InputMessageContent
from .inline.inlinequery import InlineQuery from ._inline.inlinequery import InlineQuery
from .inline.inlinequeryresult import InlineQueryResult from ._inline.inlinequeryresult import InlineQueryResult
from .inline.inlinequeryresultarticle import InlineQueryResultArticle from ._inline.inlinequeryresultarticle import InlineQueryResultArticle
from .inline.inlinequeryresultaudio import InlineQueryResultAudio from ._inline.inlinequeryresultaudio import InlineQueryResultAudio
from .inline.inlinequeryresultcachedaudio import InlineQueryResultCachedAudio from ._inline.inlinequeryresultcachedaudio import InlineQueryResultCachedAudio
from .inline.inlinequeryresultcacheddocument import InlineQueryResultCachedDocument from ._inline.inlinequeryresultcacheddocument import InlineQueryResultCachedDocument
from .inline.inlinequeryresultcachedgif import InlineQueryResultCachedGif from ._inline.inlinequeryresultcachedgif import InlineQueryResultCachedGif
from .inline.inlinequeryresultcachedmpeg4gif import InlineQueryResultCachedMpeg4Gif from ._inline.inlinequeryresultcachedmpeg4gif import InlineQueryResultCachedMpeg4Gif
from .inline.inlinequeryresultcachedphoto import InlineQueryResultCachedPhoto from ._inline.inlinequeryresultcachedphoto import InlineQueryResultCachedPhoto
from .inline.inlinequeryresultcachedsticker import InlineQueryResultCachedSticker from ._inline.inlinequeryresultcachedsticker import InlineQueryResultCachedSticker
from .inline.inlinequeryresultcachedvideo import InlineQueryResultCachedVideo from ._inline.inlinequeryresultcachedvideo import InlineQueryResultCachedVideo
from .inline.inlinequeryresultcachedvoice import InlineQueryResultCachedVoice from ._inline.inlinequeryresultcachedvoice import InlineQueryResultCachedVoice
from .inline.inlinequeryresultcontact import InlineQueryResultContact from ._inline.inlinequeryresultcontact import InlineQueryResultContact
from .inline.inlinequeryresultdocument import InlineQueryResultDocument from ._inline.inlinequeryresultdocument import InlineQueryResultDocument
from .inline.inlinequeryresultgif import InlineQueryResultGif from ._inline.inlinequeryresultgif import InlineQueryResultGif
from .inline.inlinequeryresultlocation import InlineQueryResultLocation from ._inline.inlinequeryresultlocation import InlineQueryResultLocation
from .inline.inlinequeryresultmpeg4gif import InlineQueryResultMpeg4Gif from ._inline.inlinequeryresultmpeg4gif import InlineQueryResultMpeg4Gif
from .inline.inlinequeryresultphoto import InlineQueryResultPhoto from ._inline.inlinequeryresultphoto import InlineQueryResultPhoto
from .inline.inlinequeryresultvenue import InlineQueryResultVenue from ._inline.inlinequeryresultvenue import InlineQueryResultVenue
from .inline.inlinequeryresultvideo import InlineQueryResultVideo from ._inline.inlinequeryresultvideo import InlineQueryResultVideo
from .inline.inlinequeryresultvoice import InlineQueryResultVoice from ._inline.inlinequeryresultvoice import InlineQueryResultVoice
from .inline.inlinequeryresultgame import InlineQueryResultGame from ._inline.inlinequeryresultgame import InlineQueryResultGame
from .inline.inputtextmessagecontent import InputTextMessageContent from ._inline.inputtextmessagecontent import InputTextMessageContent
from .inline.inputlocationmessagecontent import InputLocationMessageContent from ._inline.inputlocationmessagecontent import InputLocationMessageContent
from .inline.inputvenuemessagecontent import InputVenueMessageContent from ._inline.inputvenuemessagecontent import InputVenueMessageContent
from .payment.labeledprice import LabeledPrice from ._payment.labeledprice import LabeledPrice
from .inline.inputinvoicemessagecontent import InputInvoiceMessageContent from ._inline.inputinvoicemessagecontent import InputInvoiceMessageContent
from .inline.inputcontactmessagecontent import InputContactMessageContent from ._inline.inputcontactmessagecontent import InputContactMessageContent
from .payment.shippingoption import ShippingOption from ._payment.shippingoption import ShippingOption
from .payment.precheckoutquery import PreCheckoutQuery from ._payment.precheckoutquery import PreCheckoutQuery
from .payment.shippingquery import ShippingQuery from ._payment.shippingquery import ShippingQuery
from .webhookinfo import WebhookInfo from ._webhookinfo import WebhookInfo
from .games.gamehighscore import GameHighScore from ._games.gamehighscore import GameHighScore
from .update import Update from ._update import Update
from .files.inputmedia import ( from ._files.inputmedia import (
InputMedia, InputMedia,
InputMediaVideo, InputMediaVideo,
InputMediaPhoto, InputMediaPhoto,
@ -131,7 +131,7 @@ from .files.inputmedia import (
InputMediaAudio, InputMediaAudio,
InputMediaDocument, InputMediaDocument,
) )
from .passport.passportelementerrors import ( from ._passport.passportelementerrors import (
PassportElementError, PassportElementError,
PassportElementErrorDataField, PassportElementErrorDataField,
PassportElementErrorFile, PassportElementErrorFile,
@ -143,14 +143,14 @@ from .passport.passportelementerrors import (
PassportElementErrorTranslationFiles, PassportElementErrorTranslationFiles,
PassportElementErrorUnspecified, PassportElementErrorUnspecified,
) )
from .passport.credentials import ( from ._passport.credentials import (
Credentials, Credentials,
DataCredentials, DataCredentials,
SecureData, SecureData,
SecureValue, SecureValue,
FileCredentials, FileCredentials,
) )
from .botcommandscope import ( from ._botcommandscope import (
BotCommandScope, BotCommandScope,
BotCommandScopeDefault, BotCommandScopeDefault,
BotCommandScopeAllPrivateChats, BotCommandScopeAllPrivateChats,
@ -160,8 +160,8 @@ from .botcommandscope import (
BotCommandScopeChatAdministrators, BotCommandScopeChatAdministrators,
BotCommandScopeChatMember, BotCommandScopeChatMember,
) )
from .bot import Bot from ._bot import Bot
from .version import __version__, bot_api_version # noqa: F401 from ._version import __version__, bot_api_version # noqa: F401
__author__ = 'devs@python-telegram-bot.org' __author__ = 'devs@python-telegram-bot.org'

View file

@ -93,11 +93,11 @@ from telegram import (
) )
from telegram.constants import MAX_INLINE_QUERY_RESULTS from telegram.constants import MAX_INLINE_QUERY_RESULTS
from telegram.error import InvalidToken, TelegramError from telegram.error import InvalidToken, TelegramError
from telegram.utils.defaultvalue import DEFAULT_NONE, DefaultValue, DEFAULT_20
from telegram.utils.datetime import to_timestamp
from telegram.utils.files import is_local_file, parse_file_input
from telegram.request import Request from telegram.request import Request
from telegram.utils.types import FileInput, JSONDict, ODVInput, DVInput from telegram._utils.defaultvalue import DEFAULT_NONE, DefaultValue, DEFAULT_20
from telegram._utils.datetime import to_timestamp
from telegram._utils.files import is_local_file, parse_file_input
from telegram._utils.types import FileInput, JSONDict, ODVInput, DVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import ( from telegram import (

View file

@ -21,7 +21,7 @@
from typing import Any, Union, Optional, TYPE_CHECKING, Dict, Type from typing import Any, Union, Optional, TYPE_CHECKING, Dict, Type
from telegram import TelegramObject, constants from telegram import TelegramObject, constants
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, List, Optional, Union, Tuple, ClassVar from typing import TYPE_CHECKING, Any, List, Optional, Union, Tuple, ClassVar
from telegram import Message, TelegramObject, User, Location, ReplyMarkup, constants from telegram import Message, TelegramObject, User, Location, ReplyMarkup, constants
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput, DVInput from telegram._utils.types import JSONDict, ODVInput, DVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import ( from telegram import (

View file

@ -22,11 +22,11 @@ from datetime import datetime
from typing import TYPE_CHECKING, List, Optional, ClassVar, Union, Tuple, Any from typing import TYPE_CHECKING, List, Optional, ClassVar, Union, Tuple, Any
from telegram import ChatPhoto, TelegramObject, constants from telegram import ChatPhoto, TelegramObject, constants
from telegram.utils.types import JSONDict, FileInput, ODVInput, DVInput from telegram._utils.types import JSONDict, FileInput, ODVInput, DVInput
from telegram._utils.defaultvalue import DEFAULT_NONE, DEFAULT_20
from .chatpermissions import ChatPermissions from telegram._chatpermissions import ChatPermissions
from .chatlocation import ChatLocation from telegram._chatlocation import ChatLocation
from .utils.defaultvalue import DEFAULT_NONE, DEFAULT_20
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import ( from telegram import (

View file

@ -21,8 +21,8 @@ import datetime
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import TelegramObject, User from telegram import TelegramObject, User
from telegram.utils.datetime import from_timestamp, to_timestamp from telegram._utils.datetime import from_timestamp, to_timestamp
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,9 +21,9 @@ import datetime
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import TelegramObject, User, Chat, ChatInviteLink from telegram import TelegramObject, User, Chat, ChatInviteLink
from telegram.utils.datetime import from_timestamp, to_timestamp from telegram._utils.datetime import from_timestamp, to_timestamp
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,9 +21,9 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
from .files.location import Location from telegram._files.location import Location
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,8 +21,8 @@ import datetime
from typing import TYPE_CHECKING, Optional, ClassVar, Dict, Type from typing import TYPE_CHECKING, Optional, ClassVar, Dict, Type
from telegram import TelegramObject, User, constants from telegram import TelegramObject, User, constants
from telegram.utils.datetime import from_timestamp, to_timestamp from telegram._utils.datetime import from_timestamp, to_timestamp
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,8 +21,8 @@ import datetime
from typing import TYPE_CHECKING, Any, Optional, Dict, Tuple, Union from typing import TYPE_CHECKING, Any, Optional, Dict, Tuple, Union
from telegram import TelegramObject, User, Chat, ChatMember, ChatInviteLink from telegram import TelegramObject, User, Chat, ChatMember, ChatInviteLink
from telegram.utils.datetime import from_timestamp, to_timestamp from telegram._utils.datetime import from_timestamp, to_timestamp
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -22,7 +22,7 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import Location, TelegramObject, User from telegram import Location, TelegramObject, User
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -20,8 +20,8 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import PhotoSize, TelegramObject from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import PhotoSize, TelegramObject from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -20,8 +20,8 @@
from typing import TYPE_CHECKING, Any from typing import TYPE_CHECKING, Any
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import PhotoSize, TelegramObject from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -24,8 +24,8 @@ from pathlib import Path
from typing import IO, TYPE_CHECKING, Any, Optional, Union from typing import IO, TYPE_CHECKING, Any, Optional, Union
from telegram import TelegramObject from telegram import TelegramObject
from telegram.passport.credentials import decrypt from telegram._passport.credentials import decrypt
from telegram.utils.files import is_local_file from telegram._utils.files import is_local_file
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, FileCredentials from telegram import Bot, FileCredentials

View file

@ -30,9 +30,9 @@ from telegram import (
Video, Video,
MessageEntity, MessageEntity,
) )
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.files import parse_file_input from telegram._utils.files import parse_file_input
from telegram.utils.types import FileInput, JSONDict, ODVInput from telegram._utils.types import FileInput, JSONDict, ODVInput
class InputMedia(TelegramObject): class InputMedia(TelegramObject):

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any from typing import TYPE_CHECKING, Any
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, List, Optional, ClassVar from typing import TYPE_CHECKING, Any, List, Optional, ClassVar
from telegram import PhotoSize, TelegramObject, constants from telegram import PhotoSize, TelegramObject, constants
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import Location, TelegramObject from telegram import Location, TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import PhotoSize, TelegramObject from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Optional, Any from typing import TYPE_CHECKING, Optional, Any
from telegram import PhotoSize, TelegramObject from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any from typing import TYPE_CHECKING, Any
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File from telegram import Bot, File

View file

@ -22,7 +22,7 @@ import sys
from typing import TYPE_CHECKING, Any, Dict, List, Optional from typing import TYPE_CHECKING, Any, Dict, List, Optional
from telegram import Animation, MessageEntity, PhotoSize, TelegramObject from telegram import Animation, MessageEntity, PhotoSize, TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Optional from typing import TYPE_CHECKING, Optional
from telegram import TelegramObject, User from telegram import TelegramObject, User
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Any, List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from telegram import InlineKeyboardButton, ReplyMarkup from telegram import InlineKeyboardButton, ReplyMarkup
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -22,8 +22,8 @@
from typing import TYPE_CHECKING, Any, Optional, Union, Callable, ClassVar, Sequence from typing import TYPE_CHECKING, Any, Optional, Union, Callable, ClassVar, Sequence
from telegram import Location, TelegramObject, User, constants from telegram import Location, TelegramObject, User, constants
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, InlineQueryResult from telegram import Bot, InlineQueryResult

View file

@ -22,7 +22,7 @@
from typing import Any from typing import Any
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
class InlineQueryResult(TelegramObject): class InlineQueryResult(TelegramObject):

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -22,8 +22,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -22,8 +22,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -22,8 +22,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Union, Tuple, List from typing import TYPE_CHECKING, Any, Union, Tuple, List
from telegram import InlineQueryResult, MessageEntity from telegram import InlineQueryResult, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import ODVInput from telegram._utils.types import ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import InputMessageContent, ReplyMarkup from telegram import InputMessageContent, ReplyMarkup

View file

@ -21,7 +21,7 @@
from typing import Any, List, Optional, TYPE_CHECKING from typing import Any, List, Optional, TYPE_CHECKING
from telegram import InputMessageContent, LabeledPrice from telegram import InputMessageContent, LabeledPrice
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -21,8 +21,8 @@
from typing import Any, Union, Tuple, List from typing import Any, Union, Tuple, List
from telegram import InputMessageContent, MessageEntity from telegram import InputMessageContent, MessageEntity
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
class InputTextMessageContent(InputMessageContent): class InputTextMessageContent(InputMessageContent):

View file

@ -56,9 +56,9 @@ from telegram import (
VoiceChatScheduled, VoiceChatScheduled,
) )
from telegram.helpers import escape_markdown from telegram.helpers import escape_markdown
from telegram.utils.datetime import from_timestamp, to_timestamp from telegram._utils.datetime import from_timestamp, to_timestamp
from telegram.utils.defaultvalue import DEFAULT_NONE, DEFAULT_20 from telegram._utils.defaultvalue import DEFAULT_NONE, DEFAULT_20
from telegram.utils.types import JSONDict, FileInput, ODVInput, DVInput from telegram._utils.types import JSONDict, FileInput, ODVInput, DVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import ( from telegram import (

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Any, List, Optional, ClassVar from typing import TYPE_CHECKING, Any, List, Optional, ClassVar
from telegram import TelegramObject, User, constants from telegram import TelegramObject, User, constants
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -43,7 +43,7 @@ except ImportError:
from telegram import TelegramObject from telegram import TelegramObject
from telegram.error import PassportDecryptionError from telegram.error import PassportDecryptionError
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

View file

@ -27,8 +27,8 @@ from telegram import (
ResidentialAddress, ResidentialAddress,
TelegramObject, TelegramObject,
) )
from telegram.passport.credentials import decrypt_json from telegram._passport.credentials import decrypt_json
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, Credentials from telegram import Bot, Credentials

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Any, List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from telegram import EncryptedCredentials, EncryptedPassportElement, TelegramObject from telegram import EncryptedCredentials, EncryptedPassportElement, TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, Credentials from telegram import Bot, Credentials

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from telegram import TelegramObject from telegram import TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot, File, FileCredentials from telegram import Bot, File, FileCredentials

View file

@ -21,7 +21,7 @@
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from telegram import ShippingAddress, TelegramObject from telegram import ShippingAddress, TelegramObject
from telegram.utils.types import JSONDict from telegram._utils.types import JSONDict
if TYPE_CHECKING: if TYPE_CHECKING:
from telegram import Bot from telegram import Bot

Some files were not shown because too many files have changed in this diff Show more