From 06f2b2f7230f8d6dc9ddc36646ec1d9c8d47f35c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 18 Jul 2023 13:25:09 +0300 Subject: Fix wrong import, and typing issues. --- gn3/db/phenotypes.py | 2 +- gn3/db_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gn3/db/phenotypes.py b/gn3/db/phenotypes.py index 220284d..4b6a121 100644 --- a/gn3/db/phenotypes.py +++ b/gn3/db/phenotypes.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from MySQLdb.cursors import DictCursor -from wqflask.database import Connection as DBConnection +from gn3.db_utils import Connection as DBConnection @dataclass(frozen=True) diff --git a/gn3/db_utils.py b/gn3/db_utils.py index 7d6a445..2f65a33 100644 --- a/gn3/db_utils.py +++ b/gn3/db_utils.py @@ -19,7 +19,7 @@ def parse_db_url(sql_uri: str) -> Tuple: # pylint: disable=missing-class-docstring, missing-function-docstring, too-few-public-methods class Connection(Protocol): """Type Annotation for MySQLdb's connection object""" - def cursor(self, *args) -> Any: + def cursor(self, *args, **kwargs) -> Any: """A cursor in which queries may be performed""" ... -- cgit v1.2.3