Skip to content

Commit c571382

Browse files
fix
1 parent 701b460 commit c571382

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

WDoc/utils/loaders.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,12 +545,12 @@ def load_one_doc(
545545
)
546546
assert docs[i].metadata["all_hash"], f"Empty all_hash for document: {docs[i]}"
547547

548+
total_reading_length = None
548549
try:
549550
total_reading_length = sum([float(d.metadata["doc_reading_time"]) for d in docs])
550551
except Exception:
551-
total_reading_length = None
552552
pass
553-
if total_reding_length is not None:
553+
if total_reading_length is not None:
554554
assert total_reading_length > 0.1, (
555555
f"Failing doc: total reading length is {total_reading_length:.3f}"
556556
"min which is suspiciously low. Filetype {filetype} with kwargs "

0 commit comments

Comments
 (0)