Overwrite of lang length guarantees assertion
Sciumo opened this issue · comments
if isinstance(langs[0], str):
langs = [langs]
guarantees a length of 1. ?!
Why did all_langs not get assigned langs?
Langs needs to look like:
[
["English", "Russian"],
["English"]
]
One list per input line.
If it looks like ["English", "Russian"], then we turn it into a list of lists.
Then that is that the assert should check.
It does not.
if isinstance(langs[0], str):
langs = [langs]
is guaranteed to fail
assert len(langs) == len(texts)