aboutsummaryrefslogtreecommitdiffstats
path: root/backend/route.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-07-08 15:09:17 +0100
committerGravatar GitHub <[email protected]>2024-07-08 15:09:17 +0100
commit642c0795c8738bf8b9ae39b9cf0180f7cdbac650 (patch)
tree4a075255d00d9f8a2f369567bdb79f6eefa4be9a /backend/route.py
parentMigration to official Sentry release CI action (#275) (diff)
parentStop using gunicorn and use uvicorn directly to run application (diff)
Merge pull request #276 from python-discord/jb3/environ/python-3.12
3.12 + Updates
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)