Skip to content

Commit

Permalink
coms: Add a type: ignore pragma and then improve comments in main.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkapfham committed Jul 27, 2023
1 parent 34ea78b commit e9eb1cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions chasten/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ def validate_configuration_files(
checks_files_validated_list = []
check_files_validated = False
# create an empty dictionary that will store the list of checks
overall_checks_dict = {}
overall_checks_dict: Union[
Dict[str, List[Dict[str, Union[str, Dict[str, int]]]]], Dict[Any, Any]
] = {}
# create abn empty list that will store the dicts of checks
overall_checks_list = []
overall_checks_list: List[Dict[str, Union[str, Dict[str, int]]]] = []
# initialize the dictionary to contain the empty list
overall_checks_dict["checks"] = overall_checks_list
for checks_file_name in checks_file_name_list:
Expand Down Expand Up @@ -227,9 +229,9 @@ def validate_configuration_files(
# keep track of the validation of all of validation
# records for each of the check files
checks_files_validated_list.append(check_file_validated)
# union the yml_data_dict for each of the check files
# overall_checks_dict.update(yml_data_dict)
overall_checks_dict["checks"].extend(yml_data_dict["checks"])
# add the listing of checks from the current yml_data_dict to
# the overall listing of checks in the main dictionary
overall_checks_dict["checks"].extend(yml_data_dict["checks"]) # type: ignore
# the check files are only validated if all of them are valid
check_files_validated = all(checks_files_validated_list)
# the files validated correctly; return an indicator to
Expand Down

0 comments on commit e9eb1cf

Please sign in to comment.