Grammar fixes (#4500)

* Grammar fixes

* More changes

* Grammar

* Error grammar

* Spelling

* Grammar

* REsolves grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* "commited" > "committed"

* apostrophe

* more grammar

* grammar

* `funtion` to `function`

* grammar in alias cog

* grammar in cleanup cog

* grammar in customcom cog

* grammar in mod cog

* grammar in reports cog

* fix grammar in streams cog

* missing apostrophe

* grammar fix in trivia cog

Co-authored-by: Jyu Viole Grace <24418520+thisisjvgrace@users.noreply.github.com>
Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
This commit is contained in:
Stonedestroyer 2020-10-18 09:52:56 +02:00 committed by GitHub
parent 963b8b0d29
commit 08bd0567ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 50 additions and 50 deletions

View File

@ -553,7 +553,7 @@ Core Bot
- Fixed various bugs with blacklist and whitelist (:issue:`3643`, :issue:`3642`)
- Added ``[p]set regionalformat`` command that allows users to set regional formatting that is different from bot's locale (:issue:`3677`, :issue:`3588`)
- ``[p]set locale`` allows any valid locale now, not just locales for which Red has translations (:issue:`3676`, :issue:`3596`)
- Permissions for commands in Bank, Economy and Trivia cogs can now be overriden by Permissions cog (:issue:`3672`, :issue:`3233`)
- Permissions for commands in Bank, Economy and Trivia cogs can now be overridden by Permissions cog (:issue:`3672`, :issue:`3233`)
- Outages of ``pypi.org`` no longer prevent the bot from starting (:issue:`3663`)
- Fixed formatting of help strings in fuzzy search results (:issue:`3673`, :issue:`3507`)
- Fixed few deprecation warnings related to menus and uvloop (:issue:`3644`, :issue:`3700`)

View File

@ -503,7 +503,7 @@ def main():
exc_handler = functools.partial(global_exception_handler, red)
loop.set_exception_handler(exc_handler)
# We actually can't (just) use asyncio.run here
# We probably could if we didnt support windows, but we might run into
# We probably could if we didn't support windows, but we might run into
# a scenario where this isn't true if anyone works on RPC more in the future
fut = loop.create_task(run_bot(red, cli_flags))
r_exc_handler = functools.partial(red_exception_handler, red)
@ -528,7 +528,7 @@ def main():
loop.run_until_complete(shutdown_handler(red, None, ExitCodes.CRITICAL))
finally:
# Allows transports to close properly, and prevent new ones from being opened.
# Transports may still not be closed correcly on windows, see below
# Transports may still not be closed correctly on windows, see below
loop.run_until_complete(loop.shutdown_asyncgens())
# *we* aren't cleaning up more here, but it prevents
# a runtime error at the event loop on windows

View File

@ -106,7 +106,7 @@ class AliasCache:
break
else:
continue
# basically, don't build a context manager wihout a need.
# basically, don't build a context manager without a need.
async with self.config.guild_from_id(guild_id).entries() as entry_list:
for a in entry_list:
if a.get("creator", 0) == user_id:

View File

@ -322,7 +322,7 @@ class Cleanup(commands.Cog):
two: RawMessageIds,
delete_pinned: bool = False,
):
"""Delete the messages between Messsage One and Message Two, providing the messages IDs.
"""Delete the messages between Message One and Message Two, providing the messages IDs.
The first message ID should be the older message and the second one the newer.

View File

@ -205,7 +205,7 @@ class CommandObj:
await self.db(ctx.guild).commands.set_raw(command, value=ccinfo)
async def delete(self, ctx: commands.Context, command: str):
"""Delete an already exisiting custom command"""
"""Delete an already existing custom command"""
# Check if this command is registered
if not await self.db(ctx.guild).commands.get_raw(command, default=None):
raise NotFound()

View File

@ -214,7 +214,7 @@ class ModInfo(MixinMeta):
# This is not the most optimal, but if you're hitting this, you are losing more time
# to every single check running on users than the occasional user info invoke
# We don't start by building this way, since the number of times we hit this should be
# infintesimally small compared to when we don't across all uses of Red.
# infinitesimally small compared to when we don't across all uses of Red.
continuation_string = _(
"and {numeric_number} more roles not displayed due to embed limits."
)

View File

@ -90,7 +90,7 @@ class Reports(commands.Cog):
r["user_id"] = 0xDE1
# this might include EUD, and a report of a deleted user
# that's been unhandled for long enough for the
# user to be deleted and the bot recieve a request like this...
# user to be deleted and the bot receive a request like this...
r["report"] = "[REPORT DELETED DUE TO DISCORD REQUEST]"
@property
@ -422,8 +422,8 @@ class Reports(commands.Cog):
"(8MB file size limitation on uploads) "
"will be forwarded to them until the communication is closed.\n"
"You can close a communication at any point by reacting with "
"the \N{NEGATIVE SQUARED CROSS MARK} to the last message recieved.\n"
"Any message succesfully forwarded will be marked with "
"the \N{NEGATIVE SQUARED CROSS MARK} to the last message received.\n"
"Any message successfully forwarded will be marked with "
"\N{WHITE HEAVY CHECK MARK}.\n"
"Tunnels are not persistent across bot restarts."
)

View File

@ -726,7 +726,7 @@ class Streams(commands.Cog):
content = alert_msg # Stop bad things from happening here...
content = content.replace(
"{stream.name}", str(stream.name)
) # Backwards compatability
) # Backwards compatibility
content = content.replace("{stream}", str(stream.name))
content = content.replace("{mention}", mention_str)
else:
@ -744,7 +744,7 @@ class Streams(commands.Cog):
content = alert_msg # Stop bad things from happening here...
content = content.replace(
"{stream.name}", str(stream.name)
) # Backwards compatability
) # Backwards compatibility
content = content.replace("{stream}", str(stream.name))
else:
content = _("{stream} is live!").format(

View File

@ -139,7 +139,7 @@ class YoutubeStream(Stream):
log.debug(f"livestreams for {self.name}: {self.livestreams}")
log.debug(f"not_livestreams for {self.name}: {self.not_livestreams}")
# This is technically redundant since we have the
# info from the RSS ... but incase you dont wanna deal with fully rewritting the
# info from the RSS ... but incase you don't wanna deal with fully rewritting the
# code for this part, as this is only a 2 quota query.
if self.livestreams:
params = {"key": self._token["api_key"], "id": self.livestreams[-1], "part": "snippet"}

View File

@ -160,7 +160,7 @@ class Trivia(commands.Cog):
if enabled:
await ctx.send(_("Done. I'll now gain a point if users don't answer in time."))
else:
await ctx.send(_("Alright, I won't embarass you at trivia anymore."))
await ctx.send(_("Alright, I won't embarrass you at trivia anymore."))
@triviaset.command(name="revealanswer", usage="<true_or_false>")
async def trivaset_reveal_answer(self, ctx: commands.Context, enabled: bool):

View File

@ -246,12 +246,12 @@ class RedBase(
"and implement the required interfaces."
)
# do not switch to isinstance, we want to know that this has not been overriden,
# do not switch to isinstance, we want to know that this has not been overridden,
# even with a subclass.
if type(self._help_formatter) is commands.help.RedHelpFormatter:
self._help_formatter = formatter
else:
raise RuntimeError("The formatter has already been overriden.")
raise RuntimeError("The formatter has already been overridden.")
def reset_help_formatter(self):
"""
@ -1217,7 +1217,7 @@ class RedBase(
**kwargs,
):
"""
This is a convienience wrapper around
This is a convenience wrapper around
discord.abc.Messageable.send
@ -1227,7 +1227,7 @@ class RedBase(
This should realistically only be used for responding using user provided
input. (unfortunately, including usernames)
Manually crafted messages which dont take any user input have no need of this
Manually crafted messages which don't take any user input have no need of this
Returns
-------

View File

@ -45,7 +45,7 @@ _ = Translator("nah", __file__)
"""
Anything here is either a reimplementation or re-export
of a discord.py funtion or class with more lies for mypy
of a discord.py function or class with more lies for mypy
"""
__all__ = [

View File

@ -134,7 +134,7 @@ class CogCommandMixin:
return ctx.clean_prefix
if s == "[botname]":
return ctx.me.display_name
# We shouldnt get here:
# We shouldn't get here:
return s
return formatting_pattern.sub(replacement, text)
@ -268,7 +268,7 @@ class Command(CogCommandMixin, DPYCommand):
None of your methods should start with ``red_`` or
be dunder names which start with red (eg. ``__red_test_thing__``)
unless to override behavior in a method designed to be overriden,
unless to override behavior in a method designed to be overridden,
as this prefix is reserved for future methods in order to be
able to add features non-breakingly.
@ -655,7 +655,7 @@ class Command(CogCommandMixin, DPYCommand):
@a_command.error
async def a_command_error_handler(self, ctx, error):
if isinstance(error.original, MyErrrorType):
if isinstance(error.original, MyErrorType):
self.log_exception(error.original)
else:
await ctx.bot.on_command_error(ctx, error.original, unhandled_by_cog=True)
@ -815,7 +815,7 @@ class Group(GroupMixin, Command, CogGroupMixin, DPYGroup):
return await ctx.send_help()
elif self.invoke_without_command:
# So invoke_without_command when a subcommand of this group is invoked
# will skip the the invokation of *this* command. However, because of
# will skip the invocation of *this* command. However, because of
# how our permissions system works, we don't want it to skip the checks
# as well.
if not await self.can_run(ctx, change_permission_state=True):
@ -877,8 +877,8 @@ class CogMixin(CogGroupMixin, CogCommandMixin):
Raises
------
RedUnhandledAPI
If the method was not overriden,
or an overriden implementation is not handling this
If the method was not overridden,
or an overridden implementation is not handling this
"""
raise RedUnhandledAPI()
@ -960,8 +960,8 @@ class CogMixin(CogGroupMixin, CogCommandMixin):
Raises
------
RedUnhandledAPI
If the method was not overriden,
or an overriden implementation is not handling this
If the method was not overridden,
or an overridden implementation is not handling this
"""
raise RedUnhandledAPI()
@ -1028,7 +1028,7 @@ class Cog(CogMixin, DPYCog, metaclass=DPYCogMeta):
None of your methods should start with ``red_`` or
be dunder names which start with red (eg. ``__red_test_thing__``)
unless to override behavior in a method designed to be overriden,
unless to override behavior in a method designed to be overridden,
as this prefix is reserved for future methods in order to be
able to add features non-breakingly.

View File

@ -3,7 +3,7 @@ commands.converter
==================
This module contains useful functions and classes for command argument conversion.
Some of the converters within are included provisionaly and are marked as such.
Some of the converters within are included provisionally and are marked as such.
"""
import functools
import re
@ -165,7 +165,7 @@ else:
class DictConverter(dpy_commands.Converter):
"""
Converts pairs of space seperated values to a dict
Converts pairs of space separated values to a dict
"""
def __init__(self, *expected_keys: str, delims: Optional[List[str]] = None):

View File

@ -428,17 +428,17 @@ class RedHelpFormatter(HelpFormatterABC):
offset += len(embed_dict["embed"]["description"])
offset += len(embed_dict["embed"]["title"])
# In order to only change the size of embeds when neccessary for this rather
# In order to only change the size of embeds when necessary for this rather
# than change the existing behavior for people uneffected by this
# we're only modifying the page char limit should they be impacted.
# We could consider changing this to always just subtract the offset,
# But based on when this is being handled (very end of 3.2 release)
# I'd rather not stick a major visual behavior change in at the last moment.
if page_char_limit + offset > 5500:
# This is still neccessary with the max interaction above
# This is still necessary with the max interaction above
# While we could subtract 100% of the time the offset from page_char_limit
# the intent here is to shorten again
# *only* when neccessary, by the exact neccessary amount
# *only* when necessary, by the exact neccessary amount
# To retain a visual match with prior behavior.
page_char_limit = 5500 - offset
elif page_char_limit < 250:
@ -803,7 +803,7 @@ class RedHelpFormatter(HelpFormatterABC):
c = menus.DEFAULT_CONTROLS if len(pages) > 1 else {"\N{CROSS MARK}": menus.close_menu}
# Allow other things to happen during menu timeout/interaction.
asyncio.create_task(menus.menu(ctx, pages, c, message=m))
# menu needs reactions added manually since we fed it a messsage
# menu needs reactions added manually since we fed it a message
menus.start_adding_reactions(m, c.keys())

View File

@ -3,7 +3,7 @@ commands.requires
=================
This module manages the logic of resolving command permissions and
requirements. This includes rules which override those requirements,
as well as custom checks which can be overriden, and some special
as well as custom checks which can be overridden, and some special
checks like bot permissions checks.
"""
import asyncio
@ -385,7 +385,7 @@ class Requires:
The ID of the guild for the rule's scope. Set to
`Requires.GLOBAL` for a global rule.
If a global rule is set for a model,
it will be prefered over the guild rule.
it will be preferred over the guild rule.
Returns
-------
@ -473,7 +473,7 @@ class Requires:
Parameters
----------
ctx : "Context"
The invkokation context to check with.
The invocation context to check with.
Returns
-------
@ -486,7 +486,7 @@ class Requires:
If the bot is missing required permissions to run the
command.
CommandError
Propogated from any permissions checks.
Propagated from any permissions checks.
"""
if not self.ready_event.is_set():
@ -524,7 +524,7 @@ class Requires:
cur_state = self._get_rule_from_ctx(ctx)
should_invoke, next_state = transition_permstate_to(prev_state, cur_state)
if should_invoke is None:
# NORMAL invokation, we simply follow standard procedure
# NORMAL invocation, we simply follow standard procedure
should_invoke = await self._verify_user(ctx)
elif isinstance(next_state, dict):
# NORMAL to PASSIVE_ALLOW; should we proceed as normal or transition?

View File

@ -464,7 +464,7 @@ class Group(Value):
Note
----
If retreiving a sub-group, the return value of this method will
If retrieving a sub-group, the return value of this method will
include registered defaults for values which have not yet been set.
Parameters
@ -687,7 +687,7 @@ class Config(metaclass=ConfigMeta):
Should config require registration of data keys before allowing you
to get/set values? See `force_registration`.
cog_name : str, optional
Config normally uses ``cog_instance`` to determine tha name of your cog.
Config normally uses ``cog_instance`` to determine the name of your cog.
If you wish you may pass ``None`` to ``cog_instance`` and directly specify
the name of your cog here.

View File

@ -3219,7 +3219,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
output += ", ".join(members)
if not output:
output = _("No immunty settings here.")
output = _("No immunity settings here.")
for page in pagify(output):
await ctx.send(page)

View File

@ -106,7 +106,7 @@ class Dev(commands.Cog):
lines or asynchronous code, see [p]repl or [p]eval.
Environment Variables:
ctx - command invokation context
ctx - command invocation context
bot - bot object
channel - the current channel object
author - command author's member object
@ -160,7 +160,7 @@ class Dev(commands.Cog):
as they are not mixed and they are formatted correctly.
Environment Variables:
ctx - command invokation context
ctx - command invocation context
bot - bot object
channel - the current channel object
author - command author's member object

View File

@ -42,7 +42,7 @@ class LRUDict:
def pop(self, key):
return self._dict.pop(key)
# all of the below access all of the items, and therefore shouldnt modify the ordering for eviction
# all of the below access all of the items, and therefore shouldn't modify the ordering for eviction
def keys(self):
return self._dict.keys()

View File

@ -34,7 +34,7 @@ class ContextManagerMixin(ProvidesCursor):
"""
Wraps a cursor as a context manager for a transaction
which is rolled back on unhandled exception,
or commited on non-exception exit
or committed on non-exception exit
"""
c = self.cursor() # pylint: disable=assignment-from-no-return
try:

View File

@ -240,7 +240,7 @@ async def check_permissions(ctx: "Context", perms: Dict[str, bool]) -> bool:
Parameters
----------
ctx : Context
The command invokation context to check.
The command invocation context to check.
perms : Dict[str, bool]
A dictionary mapping permissions to their required states.
Valid permission names are those listed as properties of

View File

@ -75,7 +75,7 @@ class MessagePredicate(Callable[[discord.Message], bool]):
Parameters
----------
ctx : Optional[Context]
The current invokation context.
The current invocation context.
channel : Optional[discord.TextChannel]
The channel we expect a message in. If unspecified,
defaults to ``ctx.channel``. If ``ctx`` is unspecified

View File

@ -9,7 +9,7 @@ def unsafe(f, message=None):
This form may not get used much, but there are a few cases
we may want to add something unsafe generally, but safe in specific uses.
The warning can be supressed in the safe context with warnings.catch_warnings
The warning can be suppressed in the safe context with warnings.catch_warnings
This should be used sparingly at most.
"""

View File

@ -354,7 +354,7 @@ def cli(ctx, debug):
is_flag=True,
default=None,
help=(
"Drop the entire database constaining this instance's data. Has no effect on JSON "
"Drop the entire database containing this instance's data. Has no effect on JSON "
"instances, or if --no-delete-data is set. If these options and --no-prompt are omitted,"
"you will be asked about this."
),