Skip to content

Commit 9d60b42

Browse files
Fix sync_connect signature.
Was incorrectly marked as async.
1 parent 20a086e commit 9d60b42

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

db_wrapper/connection.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# no stubs available, starting out by just determining correct return
1616
# types & annotating in my wrappers here
17-
import aiopg
17+
import aiopg # type: ignore
1818

1919
LOGGER = logging.getLogger(__name__)
2020

@@ -83,9 +83,7 @@ def _sync_try_connect(
8383

8484
dsn = f'dbname={database} user={user} password={password} host={host} port={port}'
8585

86-
# PENDS python 3.9 support in pylint
87-
# pylint: disable=unsubscriptable-object
88-
connection: Optional[aiopg.Connection] = None
86+
connection: Optional[Any] = None
8987

9088
LOGGER.info(
9189
f'Attempting to connect to database {database} as {user}@{host}:{port}...')
@@ -121,7 +119,7 @@ async def connect(
121119
return await _try_connect(connection_params)
122120

123121

124-
async def sync_connect(
122+
def sync_connect(
125123
connection_params: ConnectionParameters
126124
) -> Any:
127125
"""Establish database connection."""

0 commit comments

Comments
 (0)