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.
- 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`_.

3
.gitignore vendored
View file

@ -69,6 +69,9 @@ target/
# Sublime Text 2
*.sublime*
# VS Code
.vscode
# unitests files
game.gif
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>`_
- `jossalgon <https://github.com/jossalgon>`_
- `JRoot3D <https://github.com/JRoot3D>`_
- `kennethcheo <https://github.com/kennethcheo>`_
- `Kirill Vasin <https://github.com/vasinkd>`_
- `Kjwon15 <https://github.com/kjwon15>`_
- `Li-aung Yip <https://github.com/LiaungYip>`_

View file

@ -56,12 +56,3 @@ Arbitrary Callback Data
telegram.ext.callbackdatacache
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.request
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
# 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
# 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
[mypy-urllib3.*]

View file

@ -49,7 +49,7 @@ def get_setup_kwargs(raw=False):
raw_ext = "-raw" if raw else ""
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():
if line.startswith('__version__'):
exec(line)
@ -76,7 +76,6 @@ def get_setup_kwargs(raw=False):
long_description=readme.read_text(),
long_description_content_type='text/x-rst',
packages=packages,
install_requires=requirements,
extras_require={
'json': 'ujson',
@ -99,7 +98,7 @@ def get_setup_kwargs(raw=False):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
python_requires='>=3.7'
python_requires='>=3.7',
)
return kwargs

View file

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

View file

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

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, List, Optional, Union, Tuple, ClassVar
from telegram import Message, TelegramObject, User, Location, ReplyMarkup, constants
from telegram.utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput, DVInput
from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram._utils.types import JSONDict, ODVInput, DVInput
if TYPE_CHECKING:
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 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 .chatlocation import ChatLocation
from .utils.defaultvalue import DEFAULT_NONE, DEFAULT_20
from telegram._chatpermissions import ChatPermissions
from telegram._chatlocation import ChatLocation
if TYPE_CHECKING:
from telegram import (

View file

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

View file

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

View file

@ -21,9 +21,9 @@
from typing import TYPE_CHECKING, Any, Optional
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:
from telegram import Bot

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,8 +21,8 @@
from typing import TYPE_CHECKING, Any, Optional
from telegram import PhotoSize, TelegramObject
from telegram.utils.defaultvalue import DEFAULT_NONE
from telegram.utils.types import JSONDict, ODVInput
from telegram._utils.defaultvalue import DEFAULT_NONE
from telegram._utils.types import JSONDict, ODVInput
if TYPE_CHECKING:
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 telegram import TelegramObject
from telegram.passport.credentials import decrypt
from telegram.utils.files import is_local_file
from telegram._passport.credentials import decrypt
from telegram._utils.files import is_local_file
if TYPE_CHECKING:
from telegram import Bot, FileCredentials

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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