From 31b56adc827a4ccfc7eb21ad9415880dcace723b Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Feb 28 2020 01:33:44 +0000 Subject: Fix some typos Signed-off-by: Chenxiong Qi --- diff --git a/freshmaker/consumer.py b/freshmaker/consumer.py index 16606d4..68d48b4 100644 --- a/freshmaker/consumer.py +++ b/freshmaker/consumer.py @@ -110,7 +110,7 @@ class FreshmakerConsumer(fedmsg.consumers.FedmsgConsumer): # flask.url_for, which needs app_context to generate the URL. # We also cannot generate Flask context on the fly each time in the # mentioned json() calls, because each generation of Flask context - # changes db.session and unfortunatelly does not give it to original + # changes db.session and unfortunately does not give it to original # state which might be Flask bug, so the only safe way on backend is # to have global app_context. with app.app_context(): diff --git a/freshmaker/kojiservice.py b/freshmaker/kojiservice.py index 012d1dc..af80799 100644 --- a/freshmaker/kojiservice.py +++ b/freshmaker/kojiservice.py @@ -23,7 +23,7 @@ import koji -# Unfortunatelly we want to use "parse_NVR" provided by koji +# Unfortunately we want to use "parse_NVR" provided by koji # in freshmaker.handlers __init__.py. We cannot "import koji" there, because # it would import freshmaker.handlers.koji, so instead, we import it here # and in freshmaker.handler do "from freshmaker.kojiservice import parse_NVR". diff --git a/freshmaker/lightblue.py b/freshmaker/lightblue.py index 738ddf6..ae08fff 100644 --- a/freshmaker/lightblue.py +++ b/freshmaker/lightblue.py @@ -47,7 +47,7 @@ class LightBlueError(Exception): def __init__(self, status_code, error_response): """Initialize - :param int status_code: repsonse status code + :param int status_code: response status code :param str or dict error_response: response content returned from LightBlue server that contains error content. There are two types of error. A piece of HTML when error happens in system-wide, for example, @@ -1449,7 +1449,7 @@ class LightBlue(object): For example, if there are three images in a list - foo-1-2, foo-1-3 and foo-2-2, the foo-1-3 will be used instead of foo-1-2 on every - occurence in a list, because the NVR is higher than NVR of foo-1-2. + occurrence in a list, because the NVR is higher than NVR of foo-1-2. The foo-2-2 will be kept unchanged in a list, because it is the single record for the foo image in version 2. """ @@ -1483,7 +1483,7 @@ class LightBlue(object): # Temporary dict mapping image_group to latest released NVR for that image_group. image_group_to_latest_released_nvr = {} - # Constructs the temporary dicts as desribed above. + # Constructs the temporary dicts as described above. for image_id, images in enumerate(to_rebuild): for parent_id, image in enumerate(images): nvr = image["brew"]["build"] @@ -1515,7 +1515,7 @@ class LightBlue(object): # content_sets set. # In this case, we copy the content_sets from the released image. # This might bring issue in case the content_sets changed - # dramaticaly between released and unreleased release of such + # dramatically between released and unreleased release of such # image, but it's still the best guess we can do. # This is also used only as fallback in case "content_sets.yml" # does not exists in the dist-git repo, which should be rare @@ -1576,7 +1576,7 @@ class LightBlue(object): elif phase == "update_to_latest": for nvr in nvrs[latest_released_nvr_index + 1:]: for image_id, parent_id in nvr_to_coordinates[nvr]: - # At first replace the image in to_rebuid based + # At first replace the image in to_rebuild based # on the coordinates from temp dict. to_rebuild[image_id][parent_id] = nvr_to_image[latest_released_nvr] diff --git a/freshmaker/models.py b/freshmaker/models.py index e143b73..c14939b 100644 --- a/freshmaker/models.py +++ b/freshmaker/models.py @@ -227,7 +227,7 @@ class Event(FreshmakerBase): def get_unreleased(cls, session, states=None): """ Returns list of all unreleased events in given states. If no states - are provided, returns only events in INTIALIZED, BUILDING or COMPLETE + are provided, returns only events in INITIALIZED, BUILDING or COMPLETE state. :param session: db.session :param list states: List of states to filter events for. If None,