forked from sr2/cloud-api
minor: ruff formatter
All changes are either: - Correcting tabs - Adding/removing line breaks - Adding trailing commas
This commit is contained in:
parent
b2e5dd2ebb
commit
c689ac1e10
91 changed files with 1710 additions and 689 deletions
|
|
@ -5,6 +5,7 @@ Exceptions:
|
|||
- GroupNotFoundException: Takes an optional group_id int
|
||||
- PermNotFoundException: Takes an optional perm_id int
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
|
|
@ -12,7 +13,11 @@ from fastapi import HTTPException, status
|
|||
|
||||
class GroupNotFoundException(HTTPException):
|
||||
def __init__(self, group_id: Optional[int] = None) -> None:
|
||||
detail = "Group not found" if group_id is None else f"User with ID '{group_id}' was not found."
|
||||
detail = (
|
||||
"Group not found"
|
||||
if group_id is None
|
||||
else f"User with ID '{group_id}' was not found."
|
||||
)
|
||||
super().__init__(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=detail,
|
||||
|
|
@ -21,7 +26,11 @@ class GroupNotFoundException(HTTPException):
|
|||
|
||||
class PermNotFoundException(HTTPException):
|
||||
def __init__(self, perm_id: Optional[int] = None) -> None:
|
||||
detail = "Permission not found" if perm_id is None else f"User with ID '{perm_id}' was not found."
|
||||
detail = (
|
||||
"Permission not found"
|
||||
if perm_id is None
|
||||
else f"User with ID '{perm_id}' was not found."
|
||||
)
|
||||
super().__init__(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=detail,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue