aboutsummaryrefslogtreecommitdiffstats
path: root/backend/route.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-07-07 02:29:26 +0100
committerGravatar Joe Banks <[email protected]>2024-07-08 15:00:10 +0100
commitd0e09d2ba567f23d91ac76d1844966bafb9b063a (patch)
tree9e825e3f09df02ab32e401c7e9555df26356dd4c /backend/route.py
parentChange linting config to Ruff (diff)
Apply fixable lint settings with Ruff
Diffstat (limited to 'backend/route.py')
-rw-r--r--backend/route.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/backend/route.py b/backend/route.py
index d778bf0..a9ea7ad 100644
--- a/backend/route.py
+++ b/backend/route.py
@@ -1,6 +1,5 @@
-"""
-Base class for implementing dynamic routing.
-"""
+"""Base class for implementing dynamic routing."""
+
from starlette.endpoints import HTTPEndpoint
@@ -11,7 +10,9 @@ class Route(HTTPEndpoint):
@classmethod
def check_parameters(cls) -> None:
if not hasattr(cls, "name"):
- raise ValueError(f"Route {cls.__name__} has not defined a name")
+ msg = f"Route {cls.__name__} has not defined a name"
+ raise ValueError(msg)
if not hasattr(cls, "path"):
- raise ValueError(f"Route {cls.__name__} has not defined a path")
+ msg = f"Route {cls.__name__} has not defined a path"
+ raise ValueError(msg)