Improved typing
This commit is contained in:
parent
b526a07e19
commit
3523dbd5c5
@ -39,6 +39,6 @@ class DatabaseContext(DatabaseContextABC):
|
|||||||
def save_changes(self):
|
def save_changes(self):
|
||||||
self._db.server.commit()
|
self._db.server.commit()
|
||||||
|
|
||||||
def select(self, statement: str) -> list:
|
def select(self, statement: str) -> list[tuple]:
|
||||||
self._db.cursor.execute(statement)
|
self._db.cursor.execute(statement)
|
||||||
return self._db.cursor.fetchall()
|
return self._db.cursor.fetchall()
|
||||||
|
@ -31,7 +31,7 @@ class DatabaseContextABC(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def select(self, statement: str) -> list:
|
def select(self, statement: str) -> list[tuple]:
|
||||||
r"""Runs SQL Statements
|
r"""Runs SQL Statements
|
||||||
|
|
||||||
Parameter
|
Parameter
|
||||||
|
Loading…
Reference in New Issue
Block a user