Skip to content

Commit

Permalink
Enforce kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
katie-gardner committed Oct 9, 2023
1 parent 81d9520 commit c1653e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/validators/answers/number_answer_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def validate_value_in_limits(self):
answer_ranges = self.questionnaire_schema.numeric_answer_ranges
referred_answer = (
self.questionnaire_schema.get_numeric_value_for_value_source(
min_value, answer_ranges
value_source=min_value, answer_ranges=answer_ranges
)
)
if referred_answer["min"] < MIN_NUMBER:
Expand All @@ -88,7 +88,7 @@ def validate_value_in_limits(self):
answer_ranges = self.questionnaire_schema.numeric_answer_ranges
referred_answer = (
self.questionnaire_schema.get_numeric_value_for_value_source(
max_value, answer_ranges
value_source=max_value, answer_ranges=answer_ranges
)
)
if referred_answer["max"] > MAX_NUMBER:
Expand Down
2 changes: 1 addition & 1 deletion app/validators/questionnaire_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def is_block_in_repeating_section(self, block_id: str) -> bool:
return parent_section and self.is_repeating_section(parent_section["id"])

def get_numeric_value_for_value_source(
self, value_source: Mapping[str, str], answer_ranges: Mapping[str, Mapping]
self, *, value_source: Mapping[str, str], answer_ranges: Mapping[str, Mapping]
) -> Mapping | None:
referred_answer = None
answers_to_calculate = self.get_answer_ids_for_value_source(value_source)
Expand Down

0 comments on commit c1653e0

Please sign in to comment.