Skip to content

Commit a964de1

Browse files
ci: correct from checks.
1 parent 18ac232 commit a964de1

File tree

14 files changed

+46
-44
lines changed

14 files changed

+46
-44
lines changed

interactions/api/http/http_requests/threads.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def list_thread_members(self, thread_id: "Snowflake_Type") -> List[discord
8181
async def list_public_archived_threads(
8282
self,
8383
channel_id: "Snowflake_Type",
84-
limit: int = None,
84+
limit: int | None = None,
8585
before: Optional["Snowflake_Type"] = None,
8686
) -> discord_typings.ListThreadsData:
8787
"""
@@ -108,7 +108,7 @@ async def list_public_archived_threads(
108108
async def list_private_archived_threads(
109109
self,
110110
channel_id: "Snowflake_Type",
111-
limit: int = None,
111+
limit: int | None = None,
112112
before: Optional["Snowflake_Type"] = None,
113113
) -> discord_typings.ListThreadsData:
114114
"""
@@ -135,7 +135,7 @@ async def list_private_archived_threads(
135135
async def list_joined_private_archived_threads(
136136
self,
137137
channel_id: "Snowflake_Type",
138-
limit: int = None,
138+
limit: int | None = None,
139139
before: Optional["Snowflake_Type"] = None,
140140
) -> discord_typings.ListThreadsData:
141141
"""
@@ -229,7 +229,7 @@ async def create_forum_thread(
229229
name: str,
230230
auto_archive_duration: int,
231231
message: dict | FormData,
232-
applied_tags: List[str] = None,
232+
applied_tags: List[str] | None = None,
233233
rate_limit_per_user: Absent[int] = MISSING,
234234
files: Absent["UPLOADABLE_TYPE"] = MISSING,
235235
reason: Absent[str] = MISSING,

interactions/api/http/http_requests/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def group_dm_add_recipient(
100100
channel_id: "Snowflake_Type",
101101
user_id: "Snowflake_Type",
102102
access_token: str,
103-
nick: str = None,
103+
nick: str | None = None,
104104
) -> None:
105105
"""
106106
Adds a recipient to a Group DM using their access token.
@@ -130,7 +130,7 @@ async def group_dm_remove_recipient(self, channel_id: "Snowflake_Type", user_id:
130130
Route("DELETE", "/channels/{channel_id}/recipients/{user_id}", channel_id=channel_id, user_id=user_id)
131131
)
132132

133-
async def modify_current_user_nick(self, guild_id: "Snowflake_Type", nickname: str = None) -> None:
133+
async def modify_current_user_nick(self, guild_id: "Snowflake_Type", nickname: str | None = None) -> None:
134134
"""
135135
Modifies the nickname of the current user in a guild.
136136

interactions/api/http/http_requests/webhooks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ async def get_guild_webhooks(self, guild_id: "Snowflake_Type") -> List[discord_t
5959
"""
6060
return await self.request(Route("GET", "/guilds/{guild_id}/webhooks", guild_id=guild_id))
6161

62-
async def get_webhook(self, webhook_id: "Snowflake_Type", webhook_token: str = None) -> discord_typings.WebhookData:
62+
async def get_webhook(
63+
self, webhook_id: "Snowflake_Type", webhook_token: str | None = None
64+
) -> discord_typings.WebhookData:
6365
"""
6466
Return the new webhook object for the given id.
6567
@@ -81,7 +83,7 @@ async def modify_webhook(
8183
name: str,
8284
avatar: Any,
8385
channel_id: "Snowflake_Type",
84-
webhook_token: str = None,
86+
webhook_token: str | None = None,
8587
) -> discord_typings.WebhookData:
8688
"""
8789
Modify a webhook.
@@ -101,7 +103,7 @@ async def modify_webhook(
101103
payload={"name": name, "avatar": avatar, "channel_id": channel_id},
102104
)
103105

104-
async def delete_webhook(self, webhook_id: "Snowflake_Type", webhook_token: str = None) -> None:
106+
async def delete_webhook(self, webhook_id: "Snowflake_Type", webhook_token: str | None = None) -> None:
105107
"""
106108
Delete a webhook.
107109

interactions/api/voice/recorder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
class Recorder(threading.Thread):
32-
def __init__(self, v_state, loop, *, output_dir: str = None) -> None:
32+
def __init__(self, v_state, loop, *, output_dir: str | None = None) -> None:
3333
super().__init__()
3434
self.daemon = True
3535

interactions/client/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ async def wait_for_component(
11111111
dict,
11121112
]
11131113
] = None,
1114-
check: Absent[Optional[Union[Callable[..., bool], Callable[..., Awaitable[bool]]]]] = None,
1114+
check: Absent[Optional[Union[Callable[..., bool], Callable[..., Awaitable[bool]]]]] | None = None,
11151115
timeout: Optional[float] = None,
11161116
) -> "events.Component":
11171117
"""

interactions/ext/hybrid_commands/hybrid_slash.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ async def __call__(self, context: SlashContext, *args, **kwargs) -> None:
239239

240240
def group(
241241
self,
242-
name: str = None,
242+
name: str | None = None,
243243
description: str = "No Description Set",
244244
inherit_checks: bool = True,
245245
aliases: list[str] | None = None,
@@ -263,7 +263,7 @@ def subcommand(
263263
group_name: LocalisedName | str = None,
264264
sub_cmd_description: Absent[LocalisedDesc | str] = MISSING,
265265
group_description: Absent[LocalisedDesc | str] = MISSING,
266-
options: List[Union[SlashCommandOption, dict]] = None,
266+
options: List[Union[SlashCommandOption, dict]] | None = None,
267267
nsfw: bool = False,
268268
inherit_checks: bool = True,
269269
aliases: list[str] | None = None,
@@ -541,8 +541,8 @@ def hybrid_slash_subcommand(
541541
base_dm_permission: bool = True,
542542
subcommand_group_description: Optional[str | LocalisedDesc] = None,
543543
sub_group_desc: Optional[str | LocalisedDesc] = None,
544-
scopes: List["Snowflake_Type"] = None,
545-
options: List[dict] = None,
544+
scopes: List["Snowflake_Type"] | None = None,
545+
options: List[dict] | None = None,
546546
nsfw: bool = False,
547547
silence_autocomplete_errors: bool = False,
548548
) -> Callable[[AsyncCallable], HybridSlashCommand]:

interactions/ext/prefixed_commands/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __init__(
9292
self,
9393
name: str,
9494
default: Any = MISSING,
95-
type: Type = None,
95+
type: Type | None = None,
9696
kind: inspect._ParameterKind = inspect._ParameterKind.POSITIONAL_OR_KEYWORD,
9797
converters: Optional[list[Callable[["PrefixedContext", str], Any]]] = None,
9898
greedy: bool = False,

interactions/ext/sentry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def on_error_sentry_hook(self: Task, error: Exception) -> None:
8989

9090
def setup(
9191
bot: Client,
92-
token: str = None,
92+
token: str | None = None,
9393
filter: Optional[Callable[[dict[str, Any], dict[str, Any]], Optional[dict[str, Any]]]] = None,
9494
**kwargs,
9595
) -> None:

interactions/models/discord/channel.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ async def delete_messages(
391391
else:
392392
await self._client.http.bulk_delete_messages(self.id, message_ids, reason)
393393

394-
async def delete_message(self, message: Union[Snowflake_Type, "models.Message"], reason: str = None) -> None:
394+
async def delete_message(self, message: Union[Snowflake_Type, "models.Message"], reason: str | None = None) -> None:
395395
"""
396396
Delete a single message from a channel.
397397
@@ -565,7 +565,7 @@ async def create_thread(
565565
invitable: Absent[bool] = MISSING,
566566
rate_limit_per_user: Absent[int] = MISSING,
567567
auto_archive_duration: AutoArchiveDuration = AutoArchiveDuration.ONE_DAY,
568-
reason: Absent[str] = None,
568+
reason: Absent[str] | None = None,
569569
) -> "TYPE_THREAD_CHANNEL":
570570
"""
571571
Creates a new thread in this channel. If a message is provided, it will be used as the initial message.
@@ -605,7 +605,7 @@ async def create_thread(
605605
return self._client.cache.place_channel_data(thread_data)
606606

607607
async def fetch_public_archived_threads(
608-
self, limit: int = None, before: Optional["models.Timestamp"] = None
608+
self, limit: int | None = None, before: Optional["models.Timestamp"] = None
609609
) -> "models.ThreadList":
610610
"""
611611
Get a `ThreadList` of archived **public** threads available in this channel.
@@ -625,7 +625,7 @@ async def fetch_public_archived_threads(
625625
return models.ThreadList.from_dict(threads_data, self._client)
626626

627627
async def fetch_private_archived_threads(
628-
self, limit: int = None, before: Optional["models.Timestamp"] = None
628+
self, limit: int | None = None, before: Optional["models.Timestamp"] = None
629629
) -> "models.ThreadList":
630630
"""
631631
Get a `ThreadList` of archived **private** threads available in this channel.
@@ -645,7 +645,7 @@ async def fetch_private_archived_threads(
645645
return models.ThreadList.from_dict(threads_data, self._client)
646646

647647
async def fetch_archived_threads(
648-
self, limit: int = None, before: Optional["models.Timestamp"] = None
648+
self, limit: int | None = None, before: Optional["models.Timestamp"] = None
649649
) -> "models.ThreadList":
650650
"""
651651
Get a `ThreadList` of archived threads available in this channel.
@@ -668,7 +668,7 @@ async def fetch_archived_threads(
668668
return models.ThreadList.from_dict(threads_data, self._client)
669669

670670
async def fetch_joined_private_archived_threads(
671-
self, limit: int = None, before: Optional["models.Timestamp"] = None
671+
self, limit: int | None = None, before: Optional["models.Timestamp"] = None
672672
) -> "models.ThreadList":
673673
"""
674674
Get a `ThreadList` of threads the bot is a participant of in this channel.
@@ -1224,7 +1224,7 @@ async def set_permission(
12241224
view_audit_log: bool | None = None,
12251225
view_channel: bool | None = None,
12261226
view_guild_insights: bool | None = None,
1227-
reason: str = None,
1227+
reason: str | None = None,
12281228
) -> None:
12291229
"""
12301230
Set the Permission Overwrites for a given target.
@@ -1668,7 +1668,7 @@ async def create_thread_from_message(
16681668
name: str,
16691669
message: Snowflake_Type,
16701670
auto_archive_duration: AutoArchiveDuration = AutoArchiveDuration.ONE_DAY,
1671-
reason: Absent[str] = None,
1671+
reason: Absent[str] | None = None,
16721672
) -> "GuildNewsThread":
16731673
"""
16741674
Creates a new news thread in this channel.
@@ -1751,7 +1751,7 @@ async def create_public_thread(
17511751
name: str,
17521752
auto_archive_duration: AutoArchiveDuration = AutoArchiveDuration.ONE_DAY,
17531753
rate_limit_per_user: Absent[int] = MISSING,
1754-
reason: Absent[str] = None,
1754+
reason: Absent[str] | None = None,
17551755
) -> "GuildPublicThread":
17561756
"""
17571757
Creates a new public thread in this channel.
@@ -1780,7 +1780,7 @@ async def create_private_thread(
17801780
invitable: Absent[bool] = MISSING,
17811781
auto_archive_duration: AutoArchiveDuration = AutoArchiveDuration.ONE_DAY,
17821782
rate_limit_per_user: Absent[int] = MISSING,
1783-
reason: Absent[str] = None,
1783+
reason: Absent[str] | None = None,
17841784
) -> "GuildPrivateThread":
17851785
"""
17861786
Creates a new private thread in this channel.
@@ -1810,7 +1810,7 @@ async def create_thread_from_message(
18101810
name: str,
18111811
message: Snowflake_Type,
18121812
auto_archive_duration: AutoArchiveDuration = AutoArchiveDuration.ONE_DAY,
1813-
reason: Absent[str] = None,
1813+
reason: Absent[str] | None = None,
18141814
) -> "GuildPublicThread":
18151815
"""
18161816
Creates a new public thread in this channel.

interactions/models/discord/components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __init__(
212212
style: ButtonStyle | int,
213213
label: str | None = None,
214214
emoji: "PartialEmoji | None | str" = None,
215-
custom_id: str = None,
215+
custom_id: str | None = None,
216216
url: str | None = None,
217217
disabled: bool = False,
218218
) -> None:

0 commit comments

Comments
 (0)