mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Black+isort
This commit is contained in:
parent
69df5f88dc
commit
5412c1a1b2
1 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from aiosqlite import connect, Connection
|
||||
from typing import Any, Dict, Mapping, Optional, cast
|
||||
|
||||
from aiosqlite import Connection, connect
|
||||
|
||||
from aiogram.fsm.storage.base import (
|
||||
BaseEventIsolation,
|
||||
BaseStorage,
|
||||
|
|
@ -45,10 +46,12 @@ class SqliteStorage(BaseStorage):
|
|||
:return: an instance of :class:`MongoStorage`
|
||||
"""
|
||||
connection = await connect(db_filename)
|
||||
await connection.execute(f'''CREATE TABLE IF NOT EXISTS aiogram_fsm (
|
||||
await connection.execute(
|
||||
f"""CREATE TABLE IF NOT EXISTS aiogram_fsm (
|
||||
id TEXT PRIMARY KEY,
|
||||
state BLOB,
|
||||
data BLOB)''')
|
||||
data BLOB)"""
|
||||
)
|
||||
await connection.commit()
|
||||
return cls(connection=connection)
|
||||
|
||||
|
|
@ -66,6 +69,3 @@ class SqliteStorage(BaseStorage):
|
|||
|
||||
async def get_data(self, key: StorageKey) -> Dict[str, Any]:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue