diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62ae9dde9..a5f4b39c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,9 @@ ci: autofix_prs: false autoupdate_schedule: monthly + # We currently only need this behavior on the v13.x branch were we have the vendored urllib + # TODO: Remove once we discontinue v13 + submodules: true repos: - repo: https://github.com/psf/black diff --git a/telegram/_bot.py b/telegram/_bot.py index e5379ee60..b6b9c0325 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -42,7 +42,6 @@ from typing import ( no_type_check, ) - try: from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization diff --git a/telegram/_telegramobject.py b/telegram/_telegramobject.py index f95a57226..a4c9e2f35 100644 --- a/telegram/_telegramobject.py +++ b/telegram/_telegramobject.py @@ -19,8 +19,6 @@ """Base class for Telegram Objects.""" import json from copy import deepcopy - - from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type, TypeVar, Union from telegram._utils.types import JSONDict diff --git a/telegram/request/_baserequest.py b/telegram/request/_baserequest.py index 848a529e5..9d0939ada 100644 --- a/telegram/request/_baserequest.py +++ b/telegram/request/_baserequest.py @@ -25,7 +25,6 @@ from http import HTTPStatus from types import TracebackType from typing import ClassVar, Optional, Tuple, Type, TypeVar, Union - from telegram._utils.defaultvalue import DEFAULT_NONE as _DEFAULT_NONE from telegram._utils.types import JSONDict, ODVInput from telegram._version import __version__ as ptb_ver diff --git a/tests/test_requestdata.py b/tests/test_requestdata.py index 058ad949b..a814d3ed5 100644 --- a/tests/test_requestdata.py +++ b/tests/test_requestdata.py @@ -17,10 +17,8 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. import json -from urllib.parse import quote - - from typing import Any, Dict +from urllib.parse import quote import pytest diff --git a/tests/test_telegramobject.py b/tests/test_telegramobject.py index 756cf1573..c721149a9 100644 --- a/tests/test_telegramobject.py +++ b/tests/test_telegramobject.py @@ -22,7 +22,6 @@ from copy import deepcopy import pytest - from telegram import Chat, Message, PhotoSize, TelegramObject, User