From df1cf19d72fa4026afc88d729f32d7c5fff98fd9 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 3 Jan 2022 20:07:46 +0800 Subject: [PATCH] Fix typos --- soupsieve/css_match.py | 2 +- soupsieve/css_parser.py | 8 ++++---- tests/test_level4/test_placeholder_shown.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/soupsieve/css_match.py b/soupsieve/css_match.py index 79bb8707..49e5f070 100644 --- a/soupsieve/css_match.py +++ b/soupsieve/css_match.py @@ -84,7 +84,7 @@ def assert_valid_input(cls, tag: Any) -> None: # Fail on unexpected types. if not cls.is_tag(tag): - raise TypeError("Expected a BeautifulSoup 'Tag', but instead recieved type {}".format(type(tag))) + raise TypeError("Expected a BeautifulSoup 'Tag', but instead received type {}".format(type(tag))) @staticmethod def is_doc(obj: 'bs4.Tag') -> bool: diff --git a/soupsieve/css_parser.py b/soupsieve/css_parser.py index 0536b80f..d77084d4 100644 --- a/soupsieve/css_parser.py +++ b/soupsieve/css_parser.py @@ -562,7 +562,7 @@ def parse_pseudo_class_custom(self, sel: _Selector, m: Match[str], has_selector: selector = self.custom.get(pseudo) if selector is None: raise SelectorSyntaxError( - "Undefined custom selector '{}' found at postion {}".format(pseudo, m.end(0)), + "Undefined custom selector '{}' found at position {}".format(pseudo, m.end(0)), self.pattern, m.end(0) ) @@ -828,7 +828,7 @@ def parse_combinator( if not has_selector: if not is_forgive or combinator != COMMA_COMBINATOR: raise SelectorSyntaxError( - "The combinator '{}' at postion {}, must have a selector before it".format(combinator, index), + "The combinator '{}' at position {}, must have a selector before it".format(combinator, index), self.pattern, index ) @@ -1007,7 +1007,7 @@ def parse_selectors( if not has_selector: if not is_forgive: raise SelectorSyntaxError( - "Expected a selector at postion {}".format(m.start(0)), + "Expected a selector at position {}".format(m.start(0)), self.pattern, m.start(0) ) @@ -1017,7 +1017,7 @@ def parse_selectors( break else: raise SelectorSyntaxError( - "Unmatched pseudo-class close at postion {}".format(m.start(0)), + "Unmatched pseudo-class close at position {}".format(m.start(0)), self.pattern, m.start(0) ) diff --git a/tests/test_level4/test_placeholder_shown.py b/tests/test_level4/test_placeholder_shown.py index 90fea7ca..96c9acea 100644 --- a/tests/test_level4/test_placeholder_shown.py +++ b/tests/test_level4/test_placeholder_shown.py @@ -51,7 +51,7 @@ def test_placeholder_shown(self): /* Value will override this input */ - /* Text area content overides the placeholder + /* Text area content overrides the placeholder