Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ repos:
- --diff
- --check
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/pylint
rev: v3.3.4
rev: v3.3.6
hooks:
- id: pylint
args:
Expand All @@ -33,7 +33,7 @@ repos:
- gql[aiohttp]~=3.5.0
- async-lru~=1.0.3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -51,7 +51,7 @@ repos:
args:
- --py36-plus
- repo: https://github.com/pycqa/isort
rev: 6.0.0
rev: 6.0.1
hooks:
- id: isort
name: isort
Expand Down
5 changes: 3 additions & 2 deletions components/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import re
import time
from collections import deque
from collections.abc import MutableSequence, Sequence
from copy import deepcopy
from typing import Dict, List, Match, Tuple, cast
from typing import Dict, List, Match, Optional, Tuple, cast

from httpx import codes
from telegram import (
Expand Down Expand Up @@ -323,7 +324,7 @@ async def tag_hint(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
first_match = cast(int, MessageLimit.MAX_TEXT_LENGTH)

messages = []
buttons = None
buttons: Optional[MutableSequence[Sequence[InlineKeyboardButton]]] = None
for match in cast(List[Match], context.matches):
first_match = min(first_match, match.start(0))

Expand Down