Skip to content

Commit a507055

Browse files
committed
fix linting
1 parent 2d84758 commit a507055

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

databasez/testclient.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ async def create_database(
261261
await conn.execute(sqlalchemy.text(f"CREATE DATABASE {quote(database)}"))
262262

263263
@classmethod
264-
async def drop_database(cls, url: Union[str, "sqlalchemy.URL", DatabaseURL], *, use_if_exists: bool = True) -> None:
264+
async def drop_database(
265+
cls, url: Union[str, "sqlalchemy.URL", DatabaseURL], *, use_if_exists: bool = True
266+
) -> None:
265267
url = url if isinstance(url, DatabaseURL) else DatabaseURL(url)
266268
exists_text = "IF EXISTS " if use_if_exists else ""
267269
database = url.database
@@ -278,7 +280,7 @@ async def drop_database(cls, url: Union[str, "sqlalchemy.URL", DatabaseURL], *,
278280
elif dialect_name != "sqlite":
279281
url = url.replace(database=None)
280282

281-
if dialect_name == "sqlite" :
283+
if dialect_name == "sqlite":
282284
if database and database != ":memory:":
283285
with contextlib.suppress(FileNotFoundError):
284286
os.remove(database)
@@ -328,7 +330,6 @@ async def drop_database(cls, url: Union[str, "sqlalchemy.URL", DatabaseURL], *,
328330
with contextlib.suppress(ProgrammingError):
329331
await conn.execute(text)
330332

331-
332333
def drop_db_protected(self) -> None:
333334
thread = ThreadPassingExceptions(
334335
target=asyncio.run, args=[self.drop_database(self.test_db_url)]

0 commit comments

Comments
 (0)