Skip to content

Commit

Permalink
update black setting and fixed more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldrian Harjati committed Sep 8, 2023
1 parent d521dcd commit abf01ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ build-backend = "poetry.core.masonry.api"
[tool.black]
preview = true
skip-string-normalization = true
line-length = 120
include = '\.pyi?$'
exclude = '''
/(
Expand All @@ -32,6 +31,9 @@ exclude = '''
| .github
| .devcontainer
| data
| tools
| poetry.lock
| pyproject.toml
)/
'''

Expand Down
30 changes: 15 additions & 15 deletions src/validator/phase_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
warning=True,
name="ct_guarantee.duplicates_in_field",
description=(
"'Type of guarantee' should not contain " "duplicated values."
"'Type of guarantee' should not contain duplicated values."
),
element_wise=True,
),
Expand Down Expand Up @@ -359,8 +359,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
is_greater_than_or_equal_to,
name="ct_loan_term.invalid_numeric_value",
description=(
"When present, 'loan term' must be greater than or equal"
"to 1."
"When present, 'loan term' must be greater than or equal to 1."
),
element_wise=True,
min_value="1",
Expand All @@ -370,8 +369,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
is_less_than,
name="ct_loan_term.unreasonable_numeric_value",
description=(
"When present, 'loan term' should be less than 1200"
"(100 years)."
"When present, 'loan term' should be less than 1200(100 years)."
),
element_wise=True,
max_value="1200",
Expand Down Expand Up @@ -440,7 +438,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
warning=True,
name="credit_purpose.duplicates_in_field",
description=(
"'Credit purpose' should not contain " " duplicated values."
"'Credit purpose' should not contain duplicated values."
),
element_wise=True,
),
Expand Down Expand Up @@ -508,7 +506,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
is_number,
name="amount_applied_for.invalid_numeric_format",
description=(
"When present, 'amount applied for' must be a numeric" "value."
"When present, 'amount applied for' must be a numericvalue."
),
element_wise=True,
accept_blank=True,
Expand Down Expand Up @@ -1060,8 +1058,10 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
SBLCheck(
is_number,
name="pricing_adj_index_value.invalid_numeric_format",
description="When present, 'adjustable rate transaction:"
" index value' must be a numeric value.",
description=(
"When present, 'adjustable rate transaction:"
" index value' must be a numeric value."
),
element_wise=True,
accept_blank=True,
),
Expand Down Expand Up @@ -1119,8 +1119,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
is_number,
name="pricing_initial_charges.invalid_numeric_format",
description=(
"When present, 'initial annual charges' must be a"
"numeric value."
"When present, 'initial annual charges' must be anumeric value."
),
element_wise=True,
accept_blank=True,
Expand Down Expand Up @@ -1477,8 +1476,10 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
is_greater_than_or_equal_to,
name="time_in_business.invalid_numeric_value",
description=(
"When present, 'time in business'"
" must be greater than or equal to 0.",
(
"When present, 'time in business'"
" must be greater than or equal to 0."
),
),
element_wise=True,
min_value="0",
Expand Down Expand Up @@ -1526,8 +1527,7 @@ def get_phase_1_and_2_validations_for_lei(lei: str = None):
has_valid_value_count,
name="business_ownership_status.invalid_number_of_values",
description=(
"'Business ownership status' must"
" contain at least one value."
"'Business ownership status' must contain at least one value."
),
element_wise=True,
min_length=1,
Expand Down
6 changes: 2 additions & 4 deletions src/validator/schema_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,13 @@
str,
title=(
"Field 38: North American Industry Classification System (NAICS)"
"code: NP flag"
" code: NP flag"
),
checks=[],
),
"naics_code": Column(
str,
title=(
"Field 39: North American Industry Classification" "System (NAICS) code"
),
title="Field 39: North American Industry Classification System (NAICS) code",
checks=[],
),
"number_of_workers": Column(
Expand Down

0 comments on commit abf01ed

Please sign in to comment.