mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-28 23:38:31 +01:00
Adjust pre-commit
Settings for isort
(#3043)
This commit is contained in:
parent
076955d04d
commit
d2cabcaa74
8 changed files with 19 additions and 11 deletions
|
@ -74,4 +74,6 @@ repos:
|
|||
hooks:
|
||||
- id: isort
|
||||
name: isort
|
||||
args: ["--diff"] # -diff will not apply the changes, just show them
|
||||
args:
|
||||
- --diff
|
||||
- --check
|
||||
|
|
|
@ -175,6 +175,7 @@ __all__ = ( # Keep this alphabetically ordered
|
|||
)
|
||||
|
||||
|
||||
from . import _version
|
||||
from ._bot import Bot
|
||||
from ._botcommand import BotCommand
|
||||
from ._botcommandscope import (
|
||||
|
@ -311,7 +312,6 @@ from ._telegramobject import TelegramObject
|
|||
from ._update import Update
|
||||
from ._user import User
|
||||
from ._userprofilephotos import UserProfilePhotos
|
||||
from . import _version
|
||||
|
||||
#: :obj:`str`: The version of the `python-telegram-bot` library as string.
|
||||
#: To get detailed information about the version number, please use :data:`__version_info__`
|
||||
|
|
|
@ -24,11 +24,16 @@ Warning:
|
|||
the changelog.
|
||||
"""
|
||||
from pathlib import Path
|
||||
from typing import IO, TYPE_CHECKING, Any, Dict, Optional, Tuple, TypeVar, Union, Collection
|
||||
from typing import IO, TYPE_CHECKING, Any, Collection, Dict, Optional, Tuple, TypeVar, Union
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from telegram import InputFile
|
||||
from telegram import ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
||||
from telegram import (
|
||||
ForceReply,
|
||||
InlineKeyboardMarkup,
|
||||
InputFile,
|
||||
ReplyKeyboardMarkup,
|
||||
ReplyKeyboardRemove,
|
||||
)
|
||||
from telegram._utils.defaultvalue import DefaultValue
|
||||
|
||||
FileLike = Union[IO[bytes], "InputFile"]
|
||||
|
|
|
@ -34,7 +34,7 @@ from telegram.request import BaseRequest
|
|||
from telegram.request._httpxrequest import HTTPXRequest
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from telegram.ext import BasePersistence, Defaults, CallbackContext
|
||||
from telegram.ext import BasePersistence, CallbackContext, Defaults
|
||||
|
||||
# Type hinting is a bit complicated here because we try to get to a sane level of
|
||||
# leveraging generics and therefore need a number of type variables.
|
||||
|
|
|
@ -24,6 +24,7 @@ from telegram.ext._utils.types import BD, CCT, CD, UD
|
|||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Dict
|
||||
|
||||
from telegram.ext._extbot import ExtBot
|
||||
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ from telegram.ext import (
|
|||
Application,
|
||||
ApplicationBuilder,
|
||||
ApplicationHandlerStop,
|
||||
BaseHandler,
|
||||
CallbackContext,
|
||||
CommandHandler,
|
||||
ContextTypes,
|
||||
Defaults,
|
||||
BaseHandler,
|
||||
JobQueue,
|
||||
MessageHandler,
|
||||
PicklePersistence,
|
||||
|
|
|
@ -34,10 +34,10 @@ from telegram.ext import (
|
|||
Application,
|
||||
ApplicationBuilder,
|
||||
ApplicationHandlerStop,
|
||||
BaseHandler,
|
||||
BasePersistence,
|
||||
CallbackContext,
|
||||
ConversationHandler,
|
||||
BaseHandler,
|
||||
MessageHandler,
|
||||
PersistenceInput,
|
||||
filters,
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
import pytest
|
||||
|
||||
from telegram import (
|
||||
__version_info__,
|
||||
__version__,
|
||||
__bot_api_version_info__,
|
||||
__bot_api_version__,
|
||||
__bot_api_version_info__,
|
||||
__version__,
|
||||
__version_info__,
|
||||
constants,
|
||||
)
|
||||
from telegram._version import Version
|
||||
|
|
Loading…
Reference in a new issue