Skip to content

Commit 6efbeef

Browse files
minor formatting
1 parent 3f629b4 commit 6efbeef

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

datajoint/autopopulate.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,16 @@ def handler(signum, frame):
237237
with mp.Pool(
238238
processes, _initialize_populate, (self, jobs, populate_kwargs)
239239
) as pool:
240-
with (tqdm(desc="Processes: ", total=nkeys) if display_progress else contextlib.nullcontext()) as pbar:
241-
for error in pool.imap(_call_populate1, keys, chunksize=1):
242-
if error is not None:
243-
error_list.append(error)
244-
if display_progress:
245-
pbar.update()
240+
with (
241+
tqdm(desc="Processes: ", total=nkeys)
242+
if display_progress
243+
else contextlib.nullcontext()
244+
) as pbar:
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+
pbar.update()
246250
self.connection.connect() # reconnect parent process to MySQL server
247251

248252
# restore original signal handler:

0 commit comments

Comments
 (0)