From d0e09d2ba567f23d91ac76d1844966bafb9b063a Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 7 Jul 2024 02:29:26 +0100 Subject: Apply fixable lint settings with Ruff --- backend/route.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'backend/route.py') 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) -- cgit v1.2.3