diff --git a/src/validator/phase_validations.py b/src/validator/phase_validations.py index e6856790..6c88afac 100644 --- a/src/validator/phase_validations.py +++ b/src/validator/phase_validations.py @@ -75,8 +75,9 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None): string_contains, name="uid.invalid_uid_lei", description=( - "The first 20 characters of the 'unique identifier' should match " - "the Legal Entity Identifier (LEI) for the financial institution." + "The first 20 characters of the 'unique identifier' should" + " match the Legal Entity Identifier (LEI) for the financial" + " institution." ), element_wise=True, containing_value=lei, @@ -950,11 +951,11 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None): description=( "When 'interest rate type' does not equal 1" " (adjustable interest rate, no initial rate period)," - " 3 (initial rate period > 12 months, adjustable interest rate)," - " or 5 (initial rate period <= 12 months, variable interest" - " rate), 'adjustable rate transaction: margin' must be blank." - " When 'interest rate type' equals 1, 3, or 5, 'variable" - " rate transaction: margin' must not be blank." + " 3 (initial rate period > 12 months, adjustable interest" + " rate), or 5 (initial rate period <= 12 months, variable " + "interest rate), 'adjustable rate transaction: margin' must " + "be blank. When 'interest rate type' equals 1, 3, or 5, " + "'variable rate transaction: margin' must not be blank." ), groupby="pricing_interest_rate_type", condition_values={"1", "3", "5"}, @@ -978,8 +979,8 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None): is_valid_enum, name="pricing_adj_index_name.invalid_enum_value", description=( - "'Adjustable rate transaction: index name' must equal 1, 2, 3, 4," - "5, 6, 7, 8, 9, 10, 977, or 999." + "'Adjustable rate transaction: index name' must equal " + "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 977, or 999." ), element_wise=True, accepted_values=[ @@ -1036,8 +1037,8 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None): max_value=300, name="pricing_adj_index_name_ff.invalid_text_length", description=( - "'Adjustable rate transaction: index name: other' must not exceed" - "300 characters in length." + "'Adjustable rate transaction: index name: other' must not" + " exceed 300 characters in length." ), ), ], diff --git a/src/validator/schema_template.py b/src/validator/schema_template.py index 2b320047..c1b334c2 100644 --- a/src/validator/schema_template.py +++ b/src/validator/schema_template.py @@ -505,13 +505,13 @@ ), } + def get_template() -> Dict: - """Returns a deep copy of the above schema_template object. - + """Returns a deep copy of the above schema_template object. + This is done because this dictionary template is going to be modified both by the phase 1 imputer and phase 2 imputer. This can cause absolute havoc in a program and it's proactically impossible to debug.""" - + return deepcopy(_schema_template) - \ No newline at end of file