From 08bd0567ad7010633beb4e3cf38d6cb4164cfa72 Mon Sep 17 00:00:00 2001 From: Stonedestroyer <1307729+Stonedestroyer@users.noreply.github.com> Date: Sun, 18 Oct 2020 09:52:56 +0200 Subject: [PATCH] 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 --- docs/changelog_3_3_0.rst | 2 +- redbot/__main__.py | 4 ++-- redbot/cogs/alias/alias_entry.py | 2 +- redbot/cogs/cleanup/cleanup.py | 2 +- redbot/cogs/customcom/customcom.py | 2 +- redbot/cogs/mod/names.py | 2 +- redbot/cogs/reports/reports.py | 6 +++--- redbot/cogs/streams/streams.py | 4 ++-- redbot/cogs/streams/streamtypes.py | 2 +- redbot/cogs/trivia/trivia.py | 2 +- redbot/core/bot.py | 8 ++++---- redbot/core/commands/_dpy_reimplements.py | 2 +- redbot/core/commands/commands.py | 18 +++++++++--------- redbot/core/commands/converter.py | 4 ++-- redbot/core/commands/help.py | 8 ++++---- redbot/core/commands/requires.py | 10 +++++----- redbot/core/config.py | 4 ++-- redbot/core/core_commands.py | 2 +- redbot/core/dev_commands.py | 4 ++-- redbot/core/utils/caching.py | 2 +- redbot/core/utils/dbtools.py | 2 +- redbot/core/utils/mod.py | 2 +- redbot/core/utils/predicates.py | 2 +- redbot/core/utils/safety.py | 2 +- redbot/setup.py | 2 +- 25 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/changelog_3_3_0.rst b/docs/changelog_3_3_0.rst index 234788ce3..236c20612 100644 --- a/docs/changelog_3_3_0.rst +++ b/docs/changelog_3_3_0.rst @@ -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`) diff --git a/redbot/__main__.py b/redbot/__main__.py index 812cbab0f..5f349842c 100644 --- a/redbot/__main__.py +++ b/redbot/__main__.py @@ -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 diff --git a/redbot/cogs/alias/alias_entry.py b/redbot/cogs/alias/alias_entry.py index 99ac166bb..bc6a12ad9 100644 --- a/redbot/cogs/alias/alias_entry.py +++ b/redbot/cogs/alias/alias_entry.py @@ -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: diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index b33d43566..e55ebdf9e 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -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. diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 1584ec000..1407bda31 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -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() diff --git a/redbot/cogs/mod/names.py b/redbot/cogs/mod/names.py index 087055c38..227e862fb 100644 --- a/redbot/cogs/mod/names.py +++ b/redbot/cogs/mod/names.py @@ -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." ) diff --git a/redbot/cogs/reports/reports.py b/redbot/cogs/reports/reports.py index 8df3eadab..e00c33be2 100644 --- a/redbot/cogs/reports/reports.py +++ b/redbot/cogs/reports/reports.py @@ -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." ) diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py index fdb33f31a..8117e63e6 100644 --- a/redbot/cogs/streams/streams.py +++ b/redbot/cogs/streams/streams.py @@ -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( diff --git a/redbot/cogs/streams/streamtypes.py b/redbot/cogs/streams/streamtypes.py index 59db0c4a8..d57bdd189 100644 --- a/redbot/cogs/streams/streamtypes.py +++ b/redbot/cogs/streams/streamtypes.py @@ -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"} diff --git a/redbot/cogs/trivia/trivia.py b/redbot/cogs/trivia/trivia.py index 4f80edd6e..5c2f2285f 100644 --- a/redbot/cogs/trivia/trivia.py +++ b/redbot/cogs/trivia/trivia.py @@ -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="") async def trivaset_reveal_answer(self, ctx: commands.Context, enabled: bool): diff --git a/redbot/core/bot.py b/redbot/core/bot.py index cb9267dd0..0ff047efa 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -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 ------- diff --git a/redbot/core/commands/_dpy_reimplements.py b/redbot/core/commands/_dpy_reimplements.py index 559256aad..9e1031026 100644 --- a/redbot/core/commands/_dpy_reimplements.py +++ b/redbot/core/commands/_dpy_reimplements.py @@ -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__ = [ diff --git a/redbot/core/commands/commands.py b/redbot/core/commands/commands.py index 03cd68b7d..b9660a8c7 100644 --- a/redbot/core/commands/commands.py +++ b/redbot/core/commands/commands.py @@ -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. diff --git a/redbot/core/commands/converter.py b/redbot/core/commands/converter.py index 73adec6ae..b8b003c99 100644 --- a/redbot/core/commands/converter.py +++ b/redbot/core/commands/converter.py @@ -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): diff --git a/redbot/core/commands/help.py b/redbot/core/commands/help.py index 9ad76bef4..251b4e9ca 100644 --- a/redbot/core/commands/help.py +++ b/redbot/core/commands/help.py @@ -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()) diff --git a/redbot/core/commands/requires.py b/redbot/core/commands/requires.py index f5db7d6b0..3362885ce 100644 --- a/redbot/core/commands/requires.py +++ b/redbot/core/commands/requires.py @@ -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? diff --git a/redbot/core/config.py b/redbot/core/config.py index e0f39baad..84ef96419 100644 --- a/redbot/core/config.py +++ b/redbot/core/config.py @@ -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. diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 42e79dfcf..c2d926985 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -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) diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index 6576c134b..a6647a0e9 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -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 diff --git a/redbot/core/utils/caching.py b/redbot/core/utils/caching.py index 6d31a3d1b..1057e3759 100644 --- a/redbot/core/utils/caching.py +++ b/redbot/core/utils/caching.py @@ -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() diff --git a/redbot/core/utils/dbtools.py b/redbot/core/utils/dbtools.py index 6f8d370cf..c9115d858 100644 --- a/redbot/core/utils/dbtools.py +++ b/redbot/core/utils/dbtools.py @@ -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: diff --git a/redbot/core/utils/mod.py b/redbot/core/utils/mod.py index bf036a89d..9bccac17b 100644 --- a/redbot/core/utils/mod.py +++ b/redbot/core/utils/mod.py @@ -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 diff --git a/redbot/core/utils/predicates.py b/redbot/core/utils/predicates.py index d60ed1c9e..c6fc59c25 100644 --- a/redbot/core/utils/predicates.py +++ b/redbot/core/utils/predicates.py @@ -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 diff --git a/redbot/core/utils/safety.py b/redbot/core/utils/safety.py index 4f2cdedb2..9ceaf894b 100644 --- a/redbot/core/utils/safety.py +++ b/redbot/core/utils/safety.py @@ -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. """ diff --git a/redbot/setup.py b/redbot/setup.py index 15e1f8ecf..20e9ba2ac 100644 --- a/redbot/setup.py +++ b/redbot/setup.py @@ -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." ),