Skip to content

Commit 9ea5d03

Browse files
minor formatting
1 parent 8731ad1 commit 9ea5d03

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

datajoint/autopopulate.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -236,17 +236,16 @@ def handler(signum, frame):
236236
del self.connection._conn.ctx # SSLContext is not pickleable
237237
with mp.Pool(
238238
processes, _initialize_populate, (self, jobs, populate_kwargs)
239-
) as pool:
240-
with (
241-
tqdm(desc="Processes: ", total=nkeys)
242-
if display_progress
243-
else contextlib.nullcontext()
244-
) as progress_bar:
245-
for error in pool.imap(_call_populate1, keys, chunksize=1):
246-
if error is not None:
247-
error_list.append(error)
248-
if display_progress:
249-
progress_bar.update()
239+
) as pool, (
240+
tqdm(desc="Processes: ", total=nkeys)
241+
if display_progress
242+
else contextlib.nullcontext()
243+
) as progress_bar:
244+
for error in pool.imap(_call_populate1, keys, chunksize=1):
245+
if error is not None:
246+
error_list.append(error)
247+
if display_progress:
248+
progress_bar.update()
250249
self.connection.connect() # reconnect parent process to MySQL server
251250

252251
# restore original signal handler:

0 commit comments

Comments
 (0)