lib/input/data_cleanup.py
Showing 2 of 2 total issues
Function remove_invalid_references
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
def remove_invalid_references(input_json_filename, output_json_filename, ref_toggle=False): """ This function is used to remove headers associated with invalid references. :param input_json_filename: The json file containing all the references.
- Read upRead up
Avoid deeply nested control flow statements. Open
Open
if not jfile['References'] == "": # The references are stored as a comma separated string. We have to split it at the ',' to get a list. if ref_toggle: ref_list = jfile['References'].split(',') else: