Skip to content

Commit

Permalink
Ruff linting
Browse files Browse the repository at this point in the history
To pass the Ruff linter
  • Loading branch information
jcadam14 committed Dec 5, 2023
1 parent 3a62c46 commit 4fcc327
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions regtech_data_validator/phase_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
is_valid_code,
is_valid_enum,
meets_multi_value_field_restriction,
string_contains
string_contains,
)
from regtech_data_validator.checks import SBLCheck, Severity


def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None):
lei: str | None = context.get('lei', None) if context else None
lei: str | None = context.get("lei", None) if context else None

return {
"uid": {
Expand Down Expand Up @@ -311,9 +311,7 @@ def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None)
is_valid_enum,
id="E0160",
name="ct_loan_term_flag.invalid_enum_value",
description=(
"'Loan term: NA/NP flag' must equal 900, 988, or 999."
),
description=("'Loan term: NA/NP flag' must equal 900, 988, or 999."),
severity=Severity.ERROR,
element_wise=True,
accepted_values=[
Expand Down Expand Up @@ -897,9 +895,7 @@ def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None)
is_valid_enum,
id="E0380",
name="pricing_interest_rate_type.invalid_enum_value",
description=(
"'Interest rate type' must equal 1, 2, 3, 4, 5, 6, or 999."
),
description=("'Interest rate type' must equal 1, 2, 3, 4, 5, 6, or 999."),
severity=Severity.ERROR,
element_wise=True,
accepted_values=[
Expand Down Expand Up @@ -1394,8 +1390,8 @@ def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None)
),
SBLCheck(
is_valid_code,
id='W0680',
name='census_tract_number.invalid_geoid',
id="W0680",
name="census_tract_number.invalid_geoid",
description=(
"When present, 'census tract: tract number' should be a valid "
"census tract GEOID as defined by the U.S. Census Bureau."
Expand All @@ -1404,7 +1400,7 @@ def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None)
element_wise=True,
accept_blank=True,
codes=global_data.census_geoids,
)
),
],
},
"gross_annual_revenue_flag": {
Expand Down

0 comments on commit 4fcc327

Please sign in to comment.