aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/doc/_batch_parser.py4
-rw-r--r--bot/exts/info/doc/_cog.py2
-rw-r--r--bot/exts/info/doc/_html.py2
-rw-r--r--bot/exts/info/doc/_parsing.py12
4 files changed, 10 insertions, 10 deletions
diff --git a/bot/exts/info/doc/_batch_parser.py b/bot/exts/info/doc/_batch_parser.py
index b3f72bb89..b140843b6 100644
--- a/bot/exts/info/doc/_batch_parser.py
+++ b/bot/exts/info/doc/_batch_parser.py
@@ -33,7 +33,7 @@ class StaleInventoryNotifier:
self._dev_log = bot.instance.get_channel(Channels.dev_log)
async def send_warning(self, doc_item: _cog.DocItem) -> None:
- """Send a warning to dev log is one wasn't already sent for `item`'s url."""
+ """Send a warning to dev log if one wasn't already sent for `item`'s url."""
if doc_item.url not in self._warned_urls:
self._warned_urls.add(doc_item.url)
await self._init_task
@@ -132,7 +132,7 @@ class BatchParser:
async def _parse_queue(self) -> None:
"""
- Parse all item from the queue, setting their result markdown on the futures and sending them to redis.
+ Parse all items from the queue, setting their result Markdown on the futures and sending them to redis.
The coroutine will run as long as the queue is not empty, resetting `self._parse_task` to None when finished.
"""
diff --git a/bot/exts/info/doc/_cog.py b/bot/exts/info/doc/_cog.py
index e2204bd4a..b6b9b2171 100644
--- a/bot/exts/info/doc/_cog.py
+++ b/bot/exts/info/doc/_cog.py
@@ -126,7 +126,7 @@ class DocCog(commands.Cog):
inventory_url: str,
) -> None:
"""
- Update the cog's inventory, or reschedule this method to execute again if the remote inventory unreachable.
+ Update the cog's inventory, or reschedule this method to execute again if the remote inventory is unreachable.
The first attempt is rescheduled to execute in `FETCH_RESCHEDULE_DELAY.first` minutes, the subsequent attempts
in `FETCH_RESCHEDULE_DELAY.repeated` minutes.
diff --git a/bot/exts/info/doc/_html.py b/bot/exts/info/doc/_html.py
index f9fe542ce..2884a3cf1 100644
--- a/bot/exts/info/doc/_html.py
+++ b/bot/exts/info/doc/_html.py
@@ -100,7 +100,7 @@ def get_general_description(start_element: Tag) -> List[Union[Tag, NavigableStri
"""
Get page content to a table or a tag with its class in `SEARCH_END_TAG_ATTRS`.
- A headerlink a tag is attempted to be found to skip repeating the symbol information in the description,
+ A headerlink tag is attempted to be found to skip repeating the symbol information in the description,
if it's found it's used as the tag to start the search from instead of the `start_element`.
"""
child_tags = _find_recursive_children_until_tag(start_element, _class_filter_factory(["section"]), limit=100)
diff --git a/bot/exts/info/doc/_parsing.py b/bot/exts/info/doc/_parsing.py
index 8e1b4d7a1..3350aac0a 100644
--- a/bot/exts/info/doc/_parsing.py
+++ b/bot/exts/info/doc/_parsing.py
@@ -106,7 +106,7 @@ def _split_parameters(parameters_string: str) -> Iterator[str]:
def _truncate_signatures(signatures: Collection[str]) -> Union[List[str], Collection[str]]:
"""
- Truncate passed signatures to not exceed `_MAX_SIGNAUTRES_LENGTH`.
+ Truncate passed signatures to not exceed `_MAX_SIGNATURES_LENGTH`.
If the signatures need to be truncated, parameters are collapsed until they fit withing the limit.
Individual signatures can consist of max 1, 2, ..., `_MAX_SIGNATURE_AMOUNT` lines of text,
@@ -149,10 +149,10 @@ def _get_truncated_description(
max_lines: int,
) -> str:
"""
- Truncate markdown from `elements` to be at most `max_length` characters when rendered or `max_lines` newlines.
+ Truncate the Markdown from `elements` to be at most `max_length` characters when rendered or `max_lines` newlines.
`max_length` limits the length of the rendered characters in the string,
- with the real string length limited to `_MAX_DESCRIPTION_LENGTH` to accommodate discord length limits
+ with the real string length limited to `_MAX_DESCRIPTION_LENGTH` to accommodate discord length limits.
"""
result = ""
markdown_element_ends = []
@@ -209,10 +209,10 @@ def _get_truncated_description(
def _create_markdown(signatures: Optional[List[str]], description: Iterable[Tag], url: str) -> str:
"""
- Create a markdown string with the signatures at the top, and the converted html description below them.
+ Create a Markdown string with the signatures at the top, and the converted html description below them.
The signatures are wrapped in python codeblocks, separated from the description by a newline.
- The result markdown string is max 750 rendered characters for the description with signatures at the start.
+ The result Markdown string is max 750 rendered characters for the description with signatures at the start.
"""
description = _get_truncated_description(
description,
@@ -232,7 +232,7 @@ def _create_markdown(signatures: Optional[List[str]], description: Iterable[Tag]
def get_symbol_markdown(soup: BeautifulSoup, symbol_data: DocItem) -> Optional[str]:
"""
- Return parsed markdown of the passed item using the passed in soup, truncated to fit within a discord message.
+ Return parsed Markdown of the passed item using the passed in soup, truncated to fit within a discord message.
The method of parsing and what information gets included depends on the symbol's group.
"""