mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-25 00:27:46 +01:00
Bump pre-commit
Hooks to Latest Versions (#4337)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
This commit is contained in:
parent
146ec54a00
commit
97226b1ae3
3 changed files with 8 additions and 10 deletions
|
@ -25,11 +25,11 @@ repos:
|
|||
- --diff
|
||||
- --check
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 7.0.0
|
||||
rev: 7.1.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: v3.1.0
|
||||
rev: v3.2.4
|
||||
hooks:
|
||||
- id: pylint
|
||||
files: ^(?!(tests|docs)).*\.py$
|
||||
|
@ -41,7 +41,7 @@ repos:
|
|||
- aiolimiter~=1.1.0
|
||||
- . # this basically does `pip install -e .`
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.10.0
|
||||
rev: v1.10.1
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy-ptb
|
||||
|
@ -68,7 +68,7 @@ repos:
|
|||
- cachetools~=5.3.3
|
||||
- . # this basically does `pip install -e .`
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.15.2
|
||||
rev: v3.16.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args:
|
||||
|
|
|
@ -322,9 +322,7 @@ class ApplicationBuilder(Generic[BT, CCT, UD, CD, BD, JQ]):
|
|||
bot = self._updater.bot
|
||||
update_queue = self._updater.update_queue
|
||||
|
||||
application: Application[
|
||||
BT, CCT, UD, CD, BD, JQ
|
||||
] = DefaultValue.get_value( # pylint: disable=not-callable
|
||||
application: Application[BT, CCT, UD, CD, BD, JQ] = DefaultValue.get_value(
|
||||
self._application_class
|
||||
)(
|
||||
bot=bot,
|
||||
|
|
|
@ -30,6 +30,8 @@ except ImportError:
|
|||
CACHE_TOOLS_AVAILABLE = False
|
||||
|
||||
|
||||
import contextlib
|
||||
|
||||
from telegram import CallbackQuery, InlineKeyboardButton, InlineKeyboardMarkup, Message, User
|
||||
from telegram._utils.datetime import to_float_timestamp
|
||||
from telegram.error import TelegramError
|
||||
|
@ -425,10 +427,8 @@ class CallbackDataCache:
|
|||
raise KeyError("CallbackQuery was not found in cache.") from exc
|
||||
|
||||
def __drop_keyboard(self, keyboard_uuid: str) -> None:
|
||||
try:
|
||||
with contextlib.suppress(KeyError):
|
||||
self._keyboard_data.pop(keyboard_uuid)
|
||||
except KeyError:
|
||||
return
|
||||
|
||||
def clear_callback_data(self, time_cutoff: Optional[Union[float, datetime]] = None) -> None:
|
||||
"""Clears the stored callback data.
|
||||
|
|
Loading…
Reference in a new issue