Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(models)!: Fix local imports surrounding component building. #701

Merged
merged 4 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion interactions/api/models/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ async def send(
"""
if not self._client:
raise AttributeError("HTTPClient not found!")
from ...models.component import _build_components
from ...client.models.component import _build_components
from .message import Message

_content: str = "" if content is MISSING else content
Expand Down
5 changes: 2 additions & 3 deletions interactions/api/models/gw.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import datetime
from typing import List, Optional, Union
from typing import List, Optional, Union, Any

from ...models.command import Permission
from ...models.component import ActionRow, Button, SelectMenu
from .channel import Channel, ThreadMember
from .member import Member
Expand All @@ -12,7 +11,7 @@ from .role import Role
from .user import User
from .team import Application

from ..http.http import HTTPClient
from ..http.client import HTTPClient
from ...models.command import Permission

class ApplicationCommandPermissions(DictSerializerMixin):
Expand Down
2 changes: 1 addition & 1 deletion interactions/api/models/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async def send(
"""
if not self._client:
raise AttributeError("HTTPClient not found!")
from ...models.component import _build_components
from ...client.models.component import _build_components
from .message import Message

_content: str = "" if content is MISSING else content
Expand Down
4 changes: 2 additions & 2 deletions interactions/api/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ async def edit(
if self.flags == 64:
raise Exception("You cannot edit a hidden message!")

from ...models.component import _build_components
from ...client.models.component import _build_components

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

_content: str = "" if content is MISSING else content
_tts: bool = False if tts is MISSING else tts
Expand Down
2 changes: 1 addition & 1 deletion interactions/api/models/user.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional

from .misc import DictSerializerMixin, Snowflake
from .flags import UserFlags, AppFlags
from .flags import UserFlags

class User(DictSerializerMixin):
_json: dict
Expand Down