Skip to content

Commit 7e3d163

Browse files
committed
Rename client
1 parent 6b0a698 commit 7e3d163

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
from motor.motor_asyncio import AsyncIOMotorClient
4848

4949
from core.changelog import Changelog
50-
from core.clients import DatabaseClient, PluginDatabaseClient
50+
from core.clients import ApiClient, PluginDatabaseClient
5151
from core.config import ConfigManager
5252
from core.utils import info, error, human_join
5353
from core.models import PermissionLevel
@@ -108,7 +108,7 @@ def __init__(self):
108108
self._configure_logging()
109109
# TODO: Raise fatal error if mongo_uri or other essentials are not found
110110
self._db = AsyncIOMotorClient(self.config.mongo_uri).modmail_bot
111-
self._api = DatabaseClient(self)
111+
self._api = ApiClient(self)
112112
self.plugin_db = PluginDatabaseClient(self)
113113

114114
self.metadata_task = self.loop.create_task(self.metadata_loop())
@@ -158,7 +158,7 @@ def db(self) -> typing.Optional[AsyncIOMotorClient]:
158158
return self._db
159159

160160
@property
161-
def api(self) -> DatabaseClient:
161+
def api(self) -> ApiClient:
162162
return self._api
163163

164164
@property

core/clients.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
prefix = ''
2020

2121

22-
class ApiClient:
22+
class RequestClient:
2323
"""
2424
This class represents the general request class for all type of clients.
2525
@@ -107,7 +107,7 @@ def filter_valid(self, data):
107107
return {k: v for k, v in data.items() if k in valid_keys}
108108

109109

110-
class GitHub(ApiClient):
110+
class GitHub(RequestClient):
111111
"""
112112
The client for interacting with GitHub API.
113113
@@ -255,7 +255,7 @@ async def login(cls, bot) -> 'GitHub':
255255
return self
256256

257257

258-
class DatabaseClient(ApiClient):
258+
class ApiClient(RequestClient):
259259

260260
def __init__(self, bot):
261261
super().__init__(bot)

0 commit comments

Comments
 (0)