Skip to content

Commit

Permalink
Use the right annotation to exlude line from codecov report
Browse files Browse the repository at this point in the history
  • Loading branch information
juhoinkinen committed Apr 12, 2024
1 parent 60e95f6 commit 8a2d0d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion annif/openapi/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def __init__(self, *args, **kwargs) -> None:

def _validate(self, body: Any) -> dict | None:
if not self._nullable and body is None:
raise BadRequestProblem("Request body must not be empty") # noqa
raise BadRequestProblem(
"Request body must not be empty"
) # pragma: no cover
try:
return self._validator.validate(body)
except ValidationError as exception:
Expand Down

0 comments on commit 8a2d0d5

Please sign in to comment.