mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 06:48:02 +01:00
chore: add types to method params
This commit is contained in:
parent
f75529e1c2
commit
4530400d33
2 changed files with 3 additions and 1 deletions
BIN
.coverage.Vlads-MacBook-Pro.local.24340.835500
Normal file
BIN
.coverage.Vlads-MacBook-Pro.local.24340.835500
Normal file
Binary file not shown.
|
@ -1,8 +1,10 @@
|
||||||
import importlib
|
import importlib
|
||||||
import re
|
import re
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
|
from lnbits.db import Connection
|
||||||
from lnbits.extension_manager import Extension
|
from lnbits.extension_manager import Extension
|
||||||
|
|
||||||
from . import db as core_db
|
from . import db as core_db
|
||||||
|
@ -23,7 +25,7 @@ async def migrate_extension_database(ext: Extension, current_version):
|
||||||
await run_migration(ext_conn, ext_migrations, current_version)
|
await run_migration(ext_conn, ext_migrations, current_version)
|
||||||
|
|
||||||
|
|
||||||
async def run_migration(db, migrations_module, current_version):
|
async def run_migration(db: Connection, migrations_module: Any, current_version: int):
|
||||||
matcher = re.compile(r"^m(\d\d\d)_")
|
matcher = re.compile(r"^m(\d\d\d)_")
|
||||||
db_name = migrations_module.__name__.split(".")[-2]
|
db_name = migrations_module.__name__.split(".")[-2]
|
||||||
for key, migrate in migrations_module.__dict__.items():
|
for key, migrate in migrations_module.__dict__.items():
|
||||||
|
|
Loading…
Add table
Reference in a new issue