DeveloperCAP/MLCAT

View on GitHub
lib/input/data_cleanup.py

Summary

Maintainability
B
6 hrs
Test Coverage

Showing 2 of 2 total issues

Function remove_invalid_references has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
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.
Severity: Minor
Found in lib/input/data_cleanup.py - About 6 hrs to fix

Avoid deeply nested control flow statements.
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:
Severity: Major
Found in lib/input/data_cleanup.py - About 45 mins to fix

    There are no issues that match your filters.

    Category
    Status