Skip to content

Commit 14bf354

Browse files
committed
🎨 Run ruff
1 parent f5bcb84 commit 14bf354

File tree

8 files changed

+50
-48
lines changed

8 files changed

+50
-48
lines changed

discord/components/action_row.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
from .string_select_menu import StringSelect
4545
from .user_select_menu import UserSelect
4646

47-
AllowedActionRowComponents: TypeAlias = "Button | TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect"
47+
AllowedActionRowComponents: TypeAlias = (
48+
"Button | TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect"
49+
)
4850

4951

5052
class ActionRow(WalkableComponent["ActionRowPayload", "AllowedActionRowComponents"]):

discord/components/type_aliases.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
from .user_select_menu import UserSelect
3232

3333
AnyComponent: TypeAlias = (
34-
ActionRow
35-
| Button
36-
| StringSelect
37-
| TextInput
38-
| UserSelect
39-
| RoleSelect
40-
| MentionableSelect
41-
| ChannelSelect
42-
| Section
43-
| TextDisplay
44-
| Thumbnail
45-
| MediaGallery
46-
| FileComponent
47-
| Separator
48-
| Container
49-
| Label
50-
| UnknownComponent
34+
ActionRow
35+
| Button
36+
| StringSelect
37+
| TextInput
38+
| UserSelect
39+
| RoleSelect
40+
| MentionableSelect
41+
| ChannelSelect
42+
| Section
43+
| TextDisplay
44+
| Thumbnail
45+
| MediaGallery
46+
| FileComponent
47+
| Separator
48+
| Container
49+
| Label
50+
| UnknownComponent
5151
)
5252

5353
AnyTopLevelMessageComponent: TypeAlias = (
@@ -57,30 +57,30 @@
5757
AnyTopLevelModalComponent: TypeAlias = TextDisplay | Label
5858

5959
AnyInteractionComponent: TypeAlias = (
60-
InteractionLabel
61-
| InteractionTextInput
62-
| InteractionStringSelect
63-
| InteractionTextDisplay
64-
| InteractionUserSelect
65-
| InteractionRoleSelect
66-
| InteractionMentionableSelect
67-
| InteractionChannelSelect
68-
| UnknownInteractionComponent
69-
| InteractionButton
60+
InteractionLabel
61+
| InteractionTextInput
62+
| InteractionStringSelect
63+
| InteractionTextDisplay
64+
| InteractionUserSelect
65+
| InteractionRoleSelect
66+
| InteractionMentionableSelect
67+
| InteractionChannelSelect
68+
| UnknownInteractionComponent
69+
| InteractionButton
7070
)
7171

7272
AnyTopLevelModalInteractionComponent: TypeAlias = (
7373
InteractionLabel | InteractionTextDisplay | UnknownInteractionComponent
7474
)
7575

7676
AnyMessageInteractionComponent: TypeAlias = (
77-
InteractionStringSelect
78-
| InteractionUserSelect
79-
| InteractionRoleSelect
80-
| InteractionMentionableSelect
81-
| InteractionButton
82-
| InteractionChannelSelect
83-
| UnknownInteractionComponent
77+
InteractionStringSelect
78+
| InteractionUserSelect
79+
| InteractionRoleSelect
80+
| InteractionMentionableSelect
81+
| InteractionButton
82+
| InteractionChannelSelect
83+
| UnknownInteractionComponent
8484
)
8585

8686
__all__ = ("AnyComponent",)

discord/ui/container.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
from typing import TYPE_CHECKING, ClassVar, Iterator, TypeVar
55

66
from ..colour import Colour
7-
from ..components import ActionRow
7+
from ..components import ActionRow, _component_factory
88
from ..components import Container as ContainerComponent
9-
from ..components import _component_factory
109
from ..enums import ComponentType, SeparatorSpacingSize
1110
from ..utils import find
1211
from .file import File

scripts/sync_guild_features/__main__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import json
12
import os
3+
import re
24
import sys
3-
import json
45
from pathlib import Path
5-
from github import Github
6-
from github import Auth
7-
import re
86

9-
from .utils import get_features_blob, GUILD_FEATURES_GIST_URL
7+
from github import Auth, Github
8+
109
from ..utils import create_update_pr, format_path, lint_path
10+
from .utils import GUILD_FEATURES_GIST_URL, get_features_blob
1111

1212
CI = os.environ.get("CI", "false").lower() in ("true", "1", "yes")
1313

scripts/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
from .automated_ruff import format_path, lint_path
12
from .pr import create_update_pr
2-
from .automated_ruff import lint_path, format_path
33

44
__all__ = ("create_update_pr", "lint_path", "format_path")

scripts/utils/automated_ruff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import subprocess
22
from pathlib import Path
3+
34
from ruff.__main__ import ( # type: ignore[import-untyped]
45
find_ruff_bin,
56
)

scripts/utils/pr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from __future__ import annotations
2-
import os
3-
import sys
2+
43
import datetime
4+
import os
55
import subprocess
6+
import sys
67
from pathlib import Path
78
from typing import TYPE_CHECKING
89

9-
from github import Github
10-
from github import Auth
10+
from github import Auth, Github
1111

1212
if TYPE_CHECKING:
1313
from github.PullRequest import PullRequest

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)