Skip to content

Commit 719ea38

Browse files
minor formatting
1 parent 6efbeef commit 719ea38

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

datajoint/autopopulate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def handler(signum, frame):
214214
if not nkeys:
215215
return
216216

217-
processes = min(*(_ for _ in (processes, nkeys, mp.cpu_count()) if _))
217+
processes = min(_ for _ in (processes, nkeys, mp.cpu_count()) if _)
218218

219219
error_list = []
220220
populate_kwargs = dict(
@@ -241,12 +241,12 @@ def handler(signum, frame):
241241
tqdm(desc="Processes: ", total=nkeys)
242242
if display_progress
243243
else contextlib.nullcontext()
244-
) as pbar:
244+
) as progress_bar:
245245
for error in pool.imap(_call_populate1, keys, chunksize=1):
246246
if error is not None:
247247
error_list.append(error)
248248
if display_progress:
249-
pbar.update()
249+
progress_bar.update()
250250
self.connection.connect() # reconnect parent process to MySQL server
251251

252252
# restore original signal handler:

tests/schema_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ class Website(dj.Part):
200200
"""
201201

202202
def populate_random(self, n=10):
203-
faker.Faker.seed(0) # make test deterministic
204203
fake = faker.Faker()
204+
faker.Faker.seed(0) # make test deterministic
205205
for _ in range(n):
206206
profile = fake.profile()
207207
with self.connection.transaction:

0 commit comments

Comments
 (0)