mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix that redis package is required
This commit is contained in:
parent
83eab190a4
commit
74e1380337
2 changed files with 16 additions and 5 deletions
|
|
@ -1,19 +1,26 @@
|
|||
from contextlib import suppress
|
||||
|
||||
from .context import FSMContext
|
||||
from .middleware import FSMContextMiddleware
|
||||
from .state import State, StatesGroup, StatesGroupMeta
|
||||
from .storage import (
|
||||
BaseEventIsolation,
|
||||
BaseStorage,
|
||||
DefaultKeyBuilder,
|
||||
DisabledEventIsolation,
|
||||
KeyBuilder,
|
||||
MemoryStorage,
|
||||
MemoryStorageRecord,
|
||||
RedisEventIsolation,
|
||||
RedisStorage,
|
||||
SimpleEventIsolation,
|
||||
StorageKey,
|
||||
)
|
||||
|
||||
with suppress(ImportError):
|
||||
from .storage import (
|
||||
DefaultKeyBuilder,
|
||||
KeyBuilder,
|
||||
RedisEventIsolation,
|
||||
RedisStorage,
|
||||
)
|
||||
|
||||
from .strategy import FSMStrategy, apply_strategy
|
||||
|
||||
__all__ = (
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from contextlib import suppress
|
||||
|
||||
from .base import BaseEventIsolation, BaseStorage, StorageKey
|
||||
from .memory import (
|
||||
DisabledEventIsolation,
|
||||
|
|
@ -5,7 +7,9 @@ from .memory import (
|
|||
MemoryStorageRecord,
|
||||
SimpleEventIsolation,
|
||||
)
|
||||
from .redis import DefaultKeyBuilder, KeyBuilder, RedisEventIsolation, RedisStorage
|
||||
|
||||
with suppress(ModuleNotFoundError):
|
||||
from .redis import DefaultKeyBuilder, KeyBuilder, RedisEventIsolation, RedisStorage
|
||||
|
||||
__all__ = (
|
||||
"StorageKey",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue