aboutsummaryrefslogtreecommitdiffstats
path: root/backend/route.py
diff options
context:
space:
mode:
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)