Skip to content

Commit d84d08a

Browse files
committed
smells II
1 parent 9f9ddf1 commit d84d08a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lambdas/shared/src/common/models/utils/pre_validator_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ def for_string(
3434
raise ValueError(f"{field_location} must be a non-empty string")
3535

3636
if max_length and len(field_value) > max_length:
37-
raise ValueError(f"{field_location} must be {max_length} or fewer characters")
37+
raise ValueError(f"{field_location} must be {max_length} or fewer characters")
3838

3939
if predefined_values and field_value not in predefined_values:
40-
raise ValueError(f"{field_location} must be one of the following: " + str(", ".join(predefined_values)))
40+
raise ValueError(f"{field_location} must be one of the following: " + str(", ".join(predefined_values)))
4141

4242
if not spaces_allowed and " " in field_value:
43-
raise ValueError(f"{field_location} must not contain spaces")
43+
raise ValueError(f"{field_location} must not contain spaces")
4444

4545
@staticmethod
4646
def for_list(
@@ -190,7 +190,7 @@ def for_positive_integer(field_value: int, field_location: str, max_value: int =
190190
raise ValueError(f"{field_location} must be a positive integer")
191191

192192
if max_value and field_value > max_value:
193-
raise ValueError(f"{field_location} must be an integer in the range 1 to {max_value}")
193+
raise ValueError(f"{field_location} must be an integer in the range 1 to {max_value}")
194194

195195
@staticmethod
196196
def for_integer_or_decimal(field_value: int | Decimal, field_location: str):

0 commit comments

Comments
 (0)