style: drop redundant comments and apply formatting
Frontend now uses double quotes and semicolons. No behaviour change.
This commit is contained in:
@@ -51,7 +51,6 @@ def text(body: dict, field: str, max_len: int) -> str:
|
||||
|
||||
def integer(body: dict, field: str, low: int, high: int) -> int:
|
||||
value = body.get(field)
|
||||
# bool is a subclass of int in Python; JSON true must not count as 1.
|
||||
if isinstance(value, bool) or not isinstance(value, int):
|
||||
raise ApiError(400, f"{field} must be a whole number", field)
|
||||
if not low <= value <= high:
|
||||
|
||||
Reference in New Issue
Block a user