Skip to content

Commit

Permalink
add __all__ in backend dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNeil17 committed Jun 9, 2024
1 parent 57a5031 commit 089da9c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 59 deletions.
53 changes: 0 additions & 53 deletions backend.py

This file was deleted.

2 changes: 0 additions & 2 deletions backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
from .route import Route
from .api import API
2 changes: 2 additions & 0 deletions backend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from typing import Dict

__all__ = ("API",)


class API:
def __init__(self, api_key: str):
Expand Down
8 changes: 4 additions & 4 deletions backend/route.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import requests # this is a synchronous application
from models import Player, Alliance

API_URL = "https://api.willofsteel.me"

__all__ = ("Route",)


class Route:
def __init__(self, path, method):
self.path = API_URL + path
Expand All @@ -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))
return hash((self.path, self.method))

0 comments on commit 089da9c

Please sign in to comment.