From 335fd5b38ea517a15f9767f20c4fa774ce3b41ab Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 31 Dec 2020 03:33:45 +0100 Subject: [PATCH 1/2] Fix typo discovered by codespell ___codespell --quiet-level=2___ ``` ./python-patterns/patterns/behavioral/publish_subscribe.py:68: subscirbed ==> subscribed ./python-patterns/patterns/structural/front_controller.py:30: cant ==> can't ./python-patterns/patterns/structural/front_controller.py:72: cant ==> can't ``` --- patterns/behavioral/publish_subscribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/behavioral/publish_subscribe.py b/patterns/behavioral/publish_subscribe.py index d9e2a7c42..698cf8d1d 100644 --- a/patterns/behavioral/publish_subscribe.py +++ b/patterns/behavioral/publish_subscribe.py @@ -65,7 +65,7 @@ def main(): >>> vani.subscribe("movie") >>> vani.unsubscribe("movie") - # Note that no one subscirbed to `ads` + # Note that no one subscribed to `ads` # and that vani changed their mind >>> fftv.publish("cartoon") From d8c0fd620968637ccff299e1f212c858a8a141fd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 31 Dec 2020 03:37:47 +0100 Subject: [PATCH 2/2] =?UTF-8?q?cant=20=E2=80=94>=20Cannot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.grammarly.com/blog/cannot-or-can-not/ --- patterns/structural/front_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patterns/structural/front_controller.py b/patterns/structural/front_controller.py index 02d6aecb0..9377fefeb 100644 --- a/patterns/structural/front_controller.py +++ b/patterns/structural/front_controller.py @@ -27,7 +27,7 @@ def dispatch(self, request): elif request.type == Request.tablet_type: self.tablet_view.show_index_page() else: - print("cant dispatch the request") + print("Cannot dispatch the request") class RequestController: @@ -69,7 +69,7 @@ def main(): Displaying tablet index page >>> front_controller.dispatch_request(Request('desktop')) - cant dispatch the request + Cannot dispatch the request >>> front_controller.dispatch_request('mobile') request must be a Request object