docs: fix typos (#1665)

* docs: fix typos

* typos: fix typos found by `codespell` across the codebase

* docs: fix `macOS` spelling

* docs: fix `authentification` terminology

"Authentification" is not a thing.

* docs: fix `localhost` typo in example link

* typos: fix in-code typos

These are potentially higher risk, but no other mentions of these typos
show up in the codebase.
This commit is contained in:
Ben Boeckel
2022-09-25 23:17:27 +00:00
committed by GitHub
parent 33dad80eff
commit 2e6b877ba9
46 changed files with 66 additions and 66 deletions

View File

@@ -15,7 +15,7 @@ class MealPlanService(BaseService):
def get_random_recipe(self, categories: list[RecipeCategory] = None) -> Recipe:
"""get_random_recipe returns a single recipe matching a specific criteria of
categories. if no categories are provided, a single recipe is returned from the
entire recipe databas.
entire recipe database.
Note that the recipe must contain ALL categories in the list provided.

View File

@@ -49,7 +49,7 @@ class ShoppingListService:
"""
itterates through the shopping list provided and returns
a consolidated list where all items that are matched against multiple values are
de-duplicated and only the first item is kept where the quantity is updated accoridngly.
de-duplicated and only the first item is kept where the quantity is updated accordingly.
"""
consolidated_list: list[ShoppingListItemOut] = []

View File

@@ -19,5 +19,5 @@ def move_parens_to_end(ing_str) -> str:
def check_char(char, *eql) -> bool:
"""Helper method to check if a charaters matches any of the additional provided arguments"""
"""Helper method to check if a characters matches any of the additional provided arguments"""
return any(char == eql_char for eql_char in eql)

View File

@@ -11,7 +11,7 @@ replace_abbreviations = {
"pint": " pint ",
"qt": " quart ",
"tbsp": " tablespoon ",
"tbs": " tablespoon ", # Order Matters!, 'tsb' must come after 'tbsp' incase of duplicate matches
"tbs": " tablespoon ", # Order Matters!, 'tsb' must come after 'tbsp' in case of duplicate matches
"tsp": " teaspoon ",
}
@@ -55,7 +55,7 @@ def wrap_or_clause(string: str):
'1 tsp. Diamond Crystal or ½ tsp. Morton kosher salt, plus more' -> '1 teaspoon diamond crystal (or 1/2 teaspoon morton kosher salt), plus more'
"""
# TODO: Needs more adequite testing to be sure this doens't have side effects.
# TODO: Needs more adequite testing to be sure this doesn't have side effects.
split_by_or = string.split(" or ")
split_by_comma = split_by_or[1].split(",")

View File

@@ -78,7 +78,7 @@ class NLPParser(ABCIngredientParser):
)
except Exception as e:
logger.error(f"Failed to parse ingredient: {crf_model}: {e}")
# TODO: Capture some sort of state for the user to see that an exception occured
# TODO: Capture some sort of state for the user to see that an exception occurred
ingredient = RecipeIngredient(
title="",
note=crf_model.input,

View File

@@ -83,8 +83,8 @@ class RecipeService(BaseService):
def _recipe_creation_factory(user: PrivateUser, name: str, additional_attrs: dict = None) -> Recipe:
"""
The main creation point for recipes. The factor method returns an instance of the
Recipe Schema class with the appropriate defaults set. Recipes shoudld not be created
else-where to avoid conflicts.
Recipe Schema class with the appropriate defaults set. Recipes should not be created
elsewhere to avoid conflicts.
"""
additional_attrs = additional_attrs or {}
additional_attrs["name"] = name

View File

@@ -7,7 +7,7 @@ logger = root_logger.get_logger()
class SchedulerRegistry:
"""
A container class for registring and removing callbacks for the scheduler.
A container class for registering and removing callbacks for the scheduler.
"""
_daily: list[Callable] = []

View File

@@ -17,6 +17,6 @@ Tasks Package
Common recurring tasks for the server to perform. Tasks here are registered to the SchedulerRegistry class
in the app.py file as a post-startup task. This is done to ensure that the tasks are run after the server has
started up and the Scheduler object is only avaiable to a single worker.
started up and the Scheduler object is only available to a single worker.
"""

View File

@@ -42,7 +42,7 @@ def safe_scrape_html(url: str) -> str:
raise ForceTimeoutException()
# =====================================
# Coppied from requests text property
# Copied from requests text property
# Try charset from content-type
content = None

View File

@@ -24,7 +24,7 @@ class BackgroundExecutor:
pass
def dispatch(self, task_name: ServerTaskNames, func: Callable, *args: Any, **kwargs: Any) -> ServerTask:
"""The dispatch function is a wrapper around the BackgroundTasks class in Starlett. It dirctly calls
"""The dispatch function is a wrapper around the BackgroundTasks class in Starlett. It directly calls
the add_task function and your task will be run in the background. This function all passes the id required
to check on the server tasks in the database and provide updates.

View File

@@ -18,7 +18,7 @@ class PasswordResetService(BaseService):
if user is None:
self.logger.error(f"failed to create password reset for {email=}: user doesn't exists")
# Do not raise exception here as we don't want to confirm to the client that the Email doens't exists
# Do not raise exception here as we don't want to confirm to the client that the Email doesn't exists
return None
# Create Reset Token