Skip to content

Commit cff5187

Browse files
author
Drew Yang
committed
fix: 🎨 black failed after changing pyproject.toml:required-python=">=3.8->3.9"
1 parent 4ff6af4 commit cff5187

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎datajoint/autopopulate.py‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,16 @@ def handler(signum, frame):
265265
# spawn multiple processes
266266
self.connection.close() # disconnect parent process from MySQL server
267267
del self.connection._conn.ctx # SSLContext is not pickleable
268-
with mp.Pool(
269-
processes, _initialize_populate, (self, jobs, populate_kwargs)
270-
) as pool, (
271-
tqdm(desc="Processes: ", total=nkeys)
272-
if display_progress
273-
else contextlib.nullcontext()
274-
) as progress_bar:
268+
with (
269+
mp.Pool(
270+
processes, _initialize_populate, (self, jobs, populate_kwargs)
271+
) as pool,
272+
(
273+
tqdm(desc="Processes: ", total=nkeys)
274+
if display_progress
275+
else contextlib.nullcontext()
276+
) as progress_bar,
277+
):
275278
for status in pool.imap(_call_populate1, keys, chunksize=1):
276279
if status is True:
277280
success_list.append(1)

0 commit comments

Comments
 (0)