Skip to content

Commit f3a9b0b

Browse files
feat: add codespell configuration (#1368)
Signed-off-by: arielle <[email protected]> Co-authored-by: vi <[email protected]>
1 parent 4aba1f4 commit f3a9b0b

File tree

28 files changed

+58
-46
lines changed

28 files changed

+58
-46
lines changed

.github/workflows/lint-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
# Used to determine which python versions to test against.
5050
# noxfile.py is the source of truth, which in turn draws from
51-
# pyproject.toml's `project.requires-python` and `project.classifers`.
51+
# pyproject.toml's `project.requires-python` and `project.classifiers`.
5252
python-versions:
5353
runs-on: ubuntu-latest
5454
outputs:

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ repos:
1919
- id: pretty-format-yaml
2020
args: [--autofix, --indent, '2', --offset, '2', '--preserve-quotes']
2121

22+
- repo: https://github.com/codespell-project/codespell
23+
rev: v2.4.1
24+
hooks:
25+
- id: codespell
26+
args: ['--write']
27+
additional_dependencies:
28+
- tomli
29+
2230
- repo: local
2331
hooks:
2432
- id: no-symlinks

disnake/channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3478,7 +3478,7 @@ def available_tags(self) -> List[ForumTag]:
34783478
async def trigger_typing(self) -> None:
34793479
"""|coro|
34803480
3481-
Triggers a *typing* indicator to the desination.
3481+
Triggers a *typing* indicator to the destination.
34823482
34833483
*Typing* indicator will go away after 10 seconds.
34843484
"""

disnake/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ async def delete_guild_command(self, guild_id: int, command_id: int) -> None:
30083008
Parameters
30093009
----------
30103010
guild_id: :class:`int`
3011-
The ID of the guild where the applcation command should be deleted.
3011+
The ID of the guild where the application command should be deleted.
30123012
command_id: :class:`int`
30133013
The ID of the application command to delete.
30143014
"""

disnake/ext/commands/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ async def convert(self, ctx: AnyContext, argument: str) -> disnake.MediaChannel:
656656

657657

658658
class ThreadConverter(IDConverter[disnake.Thread]):
659-
"""Coverts to a :class:`~disnake.Thread`.
659+
"""Converts to a :class:`~disnake.Thread`.
660660
661661
All lookups are via the local guild.
662662

disnake/ext/commands/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def __init__(self, argument: str) -> None:
537537

538538

539539
class BadBoolArgument(BadArgument):
540-
"""Exception raised when a boolean argument was not convertable.
540+
"""Exception raised when a boolean argument was not convertible.
541541
542542
This inherits from :exc:`BadArgument`
543543

disnake/ext/commands/interaction_bot_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ async def _sync_application_commands(self) -> None:
881881
return
882882

883883
# We assume that all commands are already cached.
884-
# Sort all invokable commands between guild IDs:
884+
# Sort all invocable commands between guild IDs:
885885
global_cmds, guild_cmds = self._ordered_unsynced_commands(self._test_guilds)
886886

887887
if self._command_sync_flags.sync_global_commands:
@@ -1416,7 +1416,7 @@ async def process_application_commands(
14161416
# either malformed API request, or some other error
14171417
# in theory this will never error: if a command exists the bot has authorisation
14181418
# in practice this is not the case, the API could change valid requests at any time
1419-
message = "This command could not be processed. Additionally, an error occured when trying to sync commands."
1419+
message = "This command could not be processed. Additionally, an error occurred when trying to sync commands."
14201420
else:
14211421
message = "This command has just been synced."
14221422
else:
@@ -1455,7 +1455,7 @@ async def process_application_commands(
14551455
event_name = "message_command"
14561456

14571457
if event_name is None or app_command is None:
1458-
# If we are here, the command being invoked is either unknown or has an unknonw type.
1458+
# If we are here, the command being invoked is either unknown or has an unknown type.
14591459
# This usually happens if the auto sync is disabled, so let's just ignore this.
14601460
return
14611461

disnake/ext/commands/params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: MIT
22

3-
"""Repsonsible for handling Params for slash commands"""
3+
"""Responsible for handling Params for slash commands"""
44

55
from __future__ import annotations
66

disnake/interactions/application_command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def __init__(
155155

156156
@property
157157
def target(self) -> Optional[Union[User, Member, Message]]:
158-
"""Optional[Union[:class:`abc.User`, :class:`Message`]]: The user or message targetted by a user or message command"""
158+
"""Optional[Union[:class:`abc.User`, :class:`Message`]]: The user or message targeted by a user or message command"""
159159
return self.data.target
160160

161161
@property
@@ -231,9 +231,9 @@ class ApplicationCommandInteractionData(Dict[str, Any]):
231231
options: List[:class:`ApplicationCommandInteractionDataOption`]
232232
A list of options from the API.
233233
target_id: :class:`int`
234-
ID of the user or message targetted by a user or message command
234+
ID of the user or message targeted by a user or message command
235235
target: Union[:class:`User`, :class:`Member`, :class:`Message`]
236-
The user or message targetted by a user or message command
236+
The user or message targeted by a user or message command
237237
"""
238238

239239
__slots__ = (

disnake/object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, id: SupportsIntCast) -> None:
5454
id = int(id)
5555
except ValueError:
5656
raise TypeError(
57-
f"id parameter must be convertable to int not {id.__class__!r}"
57+
f"id parameter must be convertible to int not {id.__class__!r}"
5858
) from None
5959
else:
6060
self.id = id

0 commit comments

Comments
 (0)