Skip to content

Commit e1bf3bb

Browse files
committed
chore: improve type-safety for migrations
1 parent 875216c commit e1bf3bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

freqtrade/persistence/migrations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import logging
22

3-
from sqlalchemy import inspect, select, text, update
3+
from sqlalchemy import Engine, inspect, select, text, update
44

55
from freqtrade.exceptions import OperationalException
66
from freqtrade.persistence.trade_model import Order, Trade
@@ -9,7 +9,7 @@
99
logger = logging.getLogger(__name__)
1010

1111

12-
def get_table_names_for_table(inspector, tabletype) -> list[str]:
12+
def get_table_names_for_table(inspector, tabletype: str) -> list[str]:
1313
return [t for t in inspector.get_table_names() if t.startswith(tabletype)]
1414

1515

@@ -350,7 +350,7 @@ def fix_wrong_max_stake_amount(engine):
350350
connection.execute(stmt)
351351

352352

353-
def check_migrate(engine, decl_base, previous_tables) -> None:
353+
def check_migrate(engine: Engine, decl_base, previous_tables: list[str]) -> None:
354354
"""
355355
Checks if migration is necessary and migrates if necessary
356356
"""

0 commit comments

Comments
 (0)