mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: #544 fixed typing
This commit is contained in:
parent
1ee6284011
commit
a67c1b0ce4
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import gettext
|
||||
import os
|
||||
from contextvars import ContextVar
|
||||
from typing import Any, Dict, Tuple
|
||||
from typing import Any, Dict, Tuple, Optional
|
||||
|
||||
from babel import Locale
|
||||
from babel.support import LazyProxy
|
||||
|
|
@ -129,7 +129,7 @@ class I18nMiddleware(BaseMiddleware):
|
|||
:return: locale name
|
||||
"""
|
||||
user: types.User = types.User.get_current()
|
||||
locale: Locale = user.locale if user else None
|
||||
locale: Optional[Locale] = user.locale if user else None
|
||||
|
||||
if locale:
|
||||
*_, data = args
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue