Use chained conditional

This commit is contained in:
Daniël de Kok 2023-01-13 15:35:01 +01:00
parent 672cad7161
commit 850ce0583d
2 changed files with 2 additions and 2 deletions

View File

@ -336,7 +336,7 @@ def _forward_fallback(
all_ids.append(ids)
all_statevecs.append(statevecs)
all_which.append(which)
if max_moves >= 1 and n_moves >= max_moves:
if n_moves >= max_moves >= 1:
break
n_moves += 1

View File

@ -381,7 +381,7 @@ class Parser(TrainablePipe):
state.c.history.push_back(clas)
output.append(costs)
batch = [(s, h, g) for s, h, g in batch if len(h) != 0]
if max_moves >= 1 and n_moves >= max_moves:
if n_moves >= max_moves >= 1:
break
n_moves += 1