theochem / iodata

Unguarded next inside generator PTC-W0063
Bug risk
Critical
1 occurrence in this check
Call to next() should be wrapped in try-except
 49def load_one(lit: LineIterator) -> dict:
 50    """Do not edit this docstring. It will be overwritten."""
 51    # check header
 52    line = next(lit) 53    if not line.startswith(" &FCI NORB="):
 54        raise LoadError(f"Incorrect file header: {line.strip()}", lit)
 55