From cc35c97c9126dcb55d783157019b9d83d451d1c7 Mon Sep 17 00:00:00 2001 From: ItsNeil17 Date: Sun, 9 Jun 2024 20:52:32 +0530 Subject: [PATCH] fix linting Signed-off-by: ItsNeil17 --- backend/__init__.py | 2 -- backend/api.py | 2 ++ backend/exceptions.py | 2 ++ backend/route.py | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/__init__.py b/backend/__init__.py index eec76f2..e69de29 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -1,2 +0,0 @@ -from .route import Route -from .api import API diff --git a/backend/api.py b/backend/api.py index d429a68..d584c7f 100644 --- a/backend/api.py +++ b/backend/api.py @@ -5,6 +5,8 @@ from models import Player, Alliance from .exceptions import AccessForbidden, ValidationError +__all__ = ("API",) + class API: def __init__(self, api_key: str): diff --git a/backend/exceptions.py b/backend/exceptions.py index b9322b0..64ec24b 100644 --- a/backend/exceptions.py +++ b/backend/exceptions.py @@ -1,5 +1,7 @@ from __future__ import annotations +__all__ = ("BackendException", "AccessForbidden", "ValidationError") + class BackendException(BaseException): """Base exception for all exceptions in this module""" diff --git a/backend/route.py b/backend/route.py index 0ac310e..a81cfb7 100644 --- a/backend/route.py +++ b/backend/route.py @@ -1,8 +1,8 @@ -import requests # this is a synchronous application -from models import Player, Alliance +__all__ = "Route" API_URL = "https://api.willofsteel.me" + class Route: def __init__(self, path, method): self.path = API_URL + path @@ -18,4 +18,4 @@ def __eq__(self, other): return self.path == other.path and self.method == other.method def __hash__(self): - return hash((self.path, self.method)) \ No newline at end of file + return hash((self.path, self.method))