Skip to content

Commit 91f9336

Browse files
committed
fix codacy warnings
1 parent 2ec005e commit 91f9336

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/gino/dialects/aiomysql.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77

88
import aiomysql
9-
from sqlalchemy import util, exc, sql
9+
from sqlalchemy import util, exc
1010
from sqlalchemy.dialects.mysql import (JSON, ENUM)
1111
from sqlalchemy.dialects.mysql.base import (
1212
MySQLCompiler,
@@ -176,7 +176,6 @@ async def _async_executemany(self, conn, query, args):
176176
q_prefix = m.group(1)
177177
q_values = m.group(2).rstrip()
178178
q_postfix = m.group(3) or ''
179-
assert q_values[0] == '(' and q_values[-1] == ')'
180179
return (await self._do_execute_many(
181180
conn, q_prefix, q_values, q_postfix, args))
182181
else:
@@ -396,7 +395,8 @@ def __init__(self, *args, **kwargs):
396395
async def init_pool(self, url, loop, pool_class=None):
397396
if pool_class is None:
398397
pool_class = Pool
399-
return await pool_class(url, loop, init=self.on_connect(), **self._pool_kwargs)
398+
return await pool_class(
399+
url, loop, init=self.on_connect(), **self._pool_kwargs)
400400

401401
# noinspection PyMethodMayBeStatic
402402
def transaction(self, raw_conn, args, kwargs):

src/gino/dialects/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def compile(self, elem, *multiparams, **params):
423423
else:
424424
return context.statement, context.parameters[0]
425425

426-
async def init_pool(self, url, loop):
426+
async def init_pool(self, url, loop, pool_class=None):
427427
raise NotImplementedError
428428

429429
def transaction(self, raw_conn, args, kwargs):

0 commit comments

Comments
 (0)