Once and for all reformat.
Will be using black code formatter
This commit is contained in:
@@ -11,7 +11,9 @@ from token_bot.persistant_database import database as pdb
|
||||
class AlertsController:
|
||||
def __init__(self, session: aiohttp.ClientSession):
|
||||
self._pdb: pdb.Database = pdb.Database(session)
|
||||
self.table = aiodynamo.client.Table = self._pdb.client.table(os.getenv('ALERTS_TABLE'))
|
||||
self.table = aiodynamo.client.Table = self._pdb.client.table(
|
||||
os.getenv("ALERTS_TABLE")
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _user_to_obj(user: int | User) -> User:
|
||||
@@ -39,5 +41,3 @@ class AlertsController:
|
||||
alert = self._alert_to_obj(alert)
|
||||
user = self._user_to_obj(user)
|
||||
await alert.remove_user(self.table, user)
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ from token_bot.persistant_database.user_schema import User
|
||||
class UsersController:
|
||||
def __init__(self, session: aiohttp.ClientSession):
|
||||
self._pdb: pdb.Database = pdb.Database(session)
|
||||
self.table: aiodynamo.client.Table = self._pdb.client.table(os.getenv('USERS_TABLE'))
|
||||
|
||||
self.table: aiodynamo.client.Table = self._pdb.client.table(
|
||||
os.getenv("USERS_TABLE")
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _user_to_obj(user: int | User) -> User:
|
||||
@@ -67,4 +68,3 @@ class UsersController:
|
||||
await user.get(self.table)
|
||||
user.subscribed_alerts.remove(alert)
|
||||
await user.put(self.table)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user