Fixed the following SonarQube code smells:

1) Do not use Array index in keys.
2) Unnecessary escape character.
3) Rename this local variable to match the regular expression ^[_a-z][a-z0-9_]*$
4) Remove the unused local variable.
This commit is contained in:
Akshay Joshi
2023-06-12 18:44:31 +05:30
parent 3e713cf58b
commit 251bf05692
31 changed files with 136 additions and 117 deletions

View File

@@ -564,6 +564,7 @@ def compare_database(params):
msg = gettext("Successfully compare the specified databases.")
total_percent = 100
diff_model_obj.set_comparison_info(msg, total_percent)
# Update the message and total percentage done in session object
update_session_diff_transaction(params['trans_id'], session_obj,
diff_model_obj)
@@ -626,6 +627,7 @@ def compare_schema(params):
msg = gettext("Successfully compare the specified schemas.")
total_percent = 100
diff_model_obj.set_comparison_info(msg, total_percent)
# Update the message and total percentage done in session object
update_session_diff_transaction(params['trans_id'], session_obj,
diff_model_obj)

View File

@@ -627,7 +627,6 @@ def directory_diff(source_dict, target_dict, ignore_keys=[], difference=None):
for index in range(len(source_dict[key])):
source = copy.deepcopy(source_dict[key][index])
if isinstance(source, list):
# TODO
pass
elif isinstance(source, dict):
# Check the above keys are exist in the dictionary