Skip to content

Commit 658a62a

Browse files
authored
fix(models)!: Fix local imports, optimise used imports (#701)
1 parent cd5922e commit 658a62a

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

interactions/api/models/channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ async def send(
231231
"""
232232
if not self._client:
233233
raise AttributeError("HTTPClient not found!")
234-
from ...models.component import _build_components
234+
from ...client.models.component import _build_components
235235
from .message import Message
236236

237237
_content: str = "" if content is MISSING else content

interactions/api/models/gw.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from datetime import datetime
2-
from typing import List, Optional, Union
2+
from typing import List, Optional, Union, Any
33

4-
from ...models.command import Permission
54
from ...models.component import ActionRow, Button, SelectMenu
65
from .channel import Channel, ThreadMember
76
from .member import Member
@@ -12,7 +11,7 @@ from .role import Role
1211
from .user import User
1312
from .team import Application
1413

15-
from ..http.http import HTTPClient
14+
from ..http.client import HTTPClient
1615
from ...models.command import Permission
1716

1817
class ApplicationCommandPermissions(DictSerializerMixin):

interactions/api/models/member.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ async def send(
252252
"""
253253
if not self._client:
254254
raise AttributeError("HTTPClient not found!")
255-
from ...models.component import _build_components
255+
from ...client.models.component import _build_components
256256
from .message import Message
257257

258258
_content: str = "" if content is MISSING else content

interactions/api/models/message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ async def edit(
380380
if self.flags == 64:
381381
raise Exception("You cannot edit a hidden message!")
382382

383-
from ...models.component import _build_components
383+
from ...client.models.component import _build_components
384384

385385
_content: str = self.content if content is MISSING else content
386386
_tts: bool = False if tts is MISSING else tts
@@ -462,7 +462,7 @@ async def reply(
462462
"""
463463
if not self._client:
464464
raise AttributeError("HTTPClient not found!")
465-
from ...models.component import _build_components
465+
from ...client.models.component import _build_components
466466

467467
_content: str = "" if content is MISSING else content
468468
_tts: bool = False if tts is MISSING else tts

interactions/api/models/user.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Optional
22

33
from .misc import DictSerializerMixin, Snowflake
4-
from .flags import UserFlags, AppFlags
4+
from .flags import UserFlags
55

66
class User(DictSerializerMixin):
77
_json: dict

0 commit comments

Comments
 (0)