-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove
temporary
from constructor
- Loading branch information
Showing
2 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# This file is part of the QuestionPy Server. (https://questionpy.org) | ||
# The QuestionPy Server is free software released under terms of the MIT license. See LICENSE.md. | ||
# (c) Technische Universität Berlin, innoCampus <[email protected]> | ||
from typing import Any | ||
|
||
from aiohttp import web | ||
from aiohttp.log import web_logger | ||
|
||
|
@@ -46,49 +48,49 @@ def __init__(self, *, reason: str | None, temporary: bool) -> None: | |
|
||
|
||
class InvalidAttemptStateError(web.HTTPBadRequest, _ExceptionMixin): | ||
def __init__(self, *, reason: str | None, temporary: bool) -> None: | ||
def __init__(self, *, reason: str | None, **_: Any) -> None: | ||
super().__init__( | ||
"Invalid attempt state was provided", | ||
RequestError( | ||
error_code=RequestErrorCode.INVALID_ATTEMPT_STATE, | ||
reason=reason, | ||
temporary=temporary, | ||
temporary=False, | ||
), | ||
) | ||
|
||
|
||
class InvalidQuestionStateError(web.HTTPBadRequest, _ExceptionMixin): | ||
def __init__(self, *, reason: str | None, temporary: bool) -> None: | ||
def __init__(self, *, reason: str | None, **_: Any) -> None: | ||
super().__init__( | ||
"Invalid question state was provided", | ||
RequestError( | ||
error_code=RequestErrorCode.INVALID_QUESTION_STATE, | ||
reason=reason, | ||
temporary=temporary, | ||
temporary=False, | ||
), | ||
) | ||
|
||
|
||
class InvalidPackageError(web.HTTPBadRequest, _ExceptionMixin): | ||
def __init__(self, *, reason: str | None, temporary: bool) -> None: | ||
def __init__(self, *, reason: str | None, **_: Any) -> None: | ||
super().__init__( | ||
"Invalid package was provided", | ||
RequestError( | ||
error_code=RequestErrorCode.INVALID_PACKAGE, | ||
reason=reason, | ||
temporary=temporary, | ||
temporary=False, | ||
), | ||
) | ||
|
||
|
||
class InvalidRequestError(web.HTTPUnprocessableEntity, _ExceptionMixin): | ||
def __init__(self, *, reason: str | None, temporary: bool) -> None: | ||
def __init__(self, *, reason: str | None, **_: Any) -> None: | ||
super().__init__( | ||
"Invalid request body was provided", | ||
RequestError( | ||
error_code=RequestErrorCode.INVALID_REQUEST, | ||
reason=reason, | ||
temporary=temporary, | ||
temporary=False, | ||
), | ||
) | ||
|
||
|