theochem / iodata

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
6 occurrences in this check
load_data_wfx has a cyclomatic complexity of 16 with "high" risk
117    )
118
119
120def load_data_wfx(lit: LineIterator) -> dict:121    """Process loaded WFX data."""
122    # get all section labels and required labels for WFX files
123    lbs_str, lbs_int, lbs_float, lbs_aint, lbs_afloat, lbs_other, required_tags = _wfx_labels()
build_obasis has a cyclomatic complexity of 16 with "high" risk
259    )
260
261
262def build_obasis(263    icenters: NDArray[int],
264    type_assignments: NDArray[int],
265    exponents: NDArray[float],
load_one has a cyclomatic complexity of 20 with "high" risk
 50    ],
 51    ["athessian"],
 52)
 53def load_one(lit: LineIterator) -> dict: 54    """Do not edit this docstring. It will be overwritten."""
 55    data = load_qchemlog_low(lit)
 56
load_one has a cyclomatic complexity of 22 with "high" risk
174        "is raised when no suitable correction can be found."
175    },
176)
177def load_one(lit: LineIterator, norm_threshold: float = 1e-4) -> dict:178    """Do not edit this docstring. It will be overwritten."""
179    charge = None
180    atnums = None
_fix_molden_from_buggy_codes has a cyclomatic complexity of 20 with "high" risk
638    return None
639
640
641def _fix_molden_from_buggy_codes(result: dict, lit: LineIterator, norm_threshold: float = 1e-4):642    """Detect errors in the data loaded from a molden or mkl file and correct.
643
644    This function can recognize erroneous files created by PSI4, ORCA and
load_one has a cyclomatic complexity of 26 with "very-high" risk
371    {},
372    LOAD_ONE_NOTES,
373)
374def load_one(lit: LineIterator) -> dict:375    """Do not edit this docstring. It will be overwritten."""
376    # Find the element number
377    atnum = None