Skip to content

Commit

Permalink
Fixing differences between local black/ruff linting and github's
Browse files Browse the repository at this point in the history
  • Loading branch information
jcadam14 committed Jan 2, 2024
1 parent d2869fc commit 35f3be9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
6 changes: 4 additions & 2 deletions regtech_data_validator/phase_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,12 +1231,14 @@ def get_phase_1_and_2_validations_for_lei(context: dict[str, str] | None = None)
),
severity=Severity.ERROR,
groupby="ct_credit_product",
conditions=[{
conditions=[
{
"condition_values": {"7", "8", "977"},
"is_equal_condition": False,
"target_value": "999",
"should_equal_target": True,
}],
}
],
),
],
},
Expand Down
34 changes: 14 additions & 20 deletions tests/test_schema_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ def test_with_invalid_dataframe(self):

def test_with_multi_invalid_dataframe(self):
df = pd.DataFrame(
data=self.util.get_data(
{
"ct_credit_product": ["989"],
"num_principal_owners": ["1"],
"action_taken": ["2"],
}
)
data=self.util.get_data({
"ct_credit_product": ["989"],
"num_principal_owners": ["1"],
"action_taken": ["2"],
})
)
p1_is_valid, p1_findings_df = validate(self.phase1_schema, df)
assert not p1_is_valid
Expand Down Expand Up @@ -195,13 +193,11 @@ def test_with_invalid_data(self):
def test_with_multi_invalid_data_with_phase1(self):
is_valid, findings_df = validate_phases(
pd.DataFrame(
data=self.util.get_data(
{
"ct_credit_product": ["989"],
"num_principal_owners": ["1"],
"action_taken": ["2"],
}
)
data=self.util.get_data({
"ct_credit_product": ["989"],
"num_principal_owners": ["1"],
"action_taken": ["2"],
})
)
)

Expand All @@ -212,12 +208,10 @@ def test_with_multi_invalid_data_with_phase1(self):
def test_with_multi_invalid_data_with_phase2(self):
is_valid, findings_df = validate_phases(
pd.DataFrame(
data=self.util.get_data(
{
"num_principal_owners": ["1"],
"action_taken": ["2"],
}
)
data=self.util.get_data({
"num_principal_owners": ["1"],
"action_taken": ["2"],
})
),
)
# since the data passed phase 1 validations
Expand Down

0 comments on commit 35f3be9

Please sign in to comment.