Skip to content

Commit 4d02693

Browse files
committed
black
1 parent dfdacb7 commit 4d02693

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

channels/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class DatabaseSyncToAsync(SyncToAsync):
1010
"""
1111
SyncToAsync version that cleans up old database connections.
1212
"""
13+
1314
def __init__(self, *args, **kwargs):
1415
self.main_thread_connections = {name: connections[name] for name in connections}
1516
super().__init__(*args, **kwargs)

tests/test_db.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
@pytest.mark.django_db
77
@pytest.mark.asyncio
8-
@pytest.mark.parametrize("db_engine", (
9-
"django.db.backends.sqlite3",
10-
"django.db.backends.postgresql",
11-
))
8+
@pytest.mark.parametrize(
9+
"db_engine", ("django.db.backends.sqlite3", "django.db.backends.postgresql")
10+
)
1211
@pytest.mark.parametrize("conn_max_age", (0, 600))
1312
async def test_database_sync_to_async(db_engine, conn_max_age, testdir):
1413
if db_engine == "django.db.backends.postgresql":
@@ -34,10 +33,8 @@ async def test_database_sync_to_async(db_engine, conn_max_age, testdir):
3433
"channels",
3534
],
3635
)
37-
""" % (
38-
db_engine,
39-
conn_max_age,
40-
)
36+
"""
37+
% (db_engine, conn_max_age)
4138
)
4239
p1 = testdir.makepyfile(
4340
"""

0 commit comments

Comments
 (0)