From e63aff2c964f5f95e9c46d91a5f02c672ad4b76f Mon Sep 17 00:00:00 2001 From: Adrian Chaves Date: Tue, 22 Sep 2026 18:04:25 +0200 Subject: [PATCH] Rephrase XXX comment, drop stale pseudo-element TODO --- cssselect/xpath.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cssselect/xpath.py b/cssselect/xpath.py index 9cfffb0..3f9686f 100644 --- a/cssselect/xpath.py +++ b/cssselect/xpath.py @@ -175,7 +175,7 @@ class GenericTranslator: "^=": "prefixmatch", "$=": "suffixmatch", "*=": "substringmatch", - "!=": "different", # XXX Not in Level 3 but meh + "!=": "different", # not part of Selectors Level 3, but widely supported } #: The attribute used for ID selectors depends on the document language: @@ -412,7 +412,6 @@ def xpath_pseudo(self, pseudo: Pseudo) -> XPathExpr: getattr(self, method_name, None), ) if not method: - # TODO: better error message for pseudo-elements? raise ExpressionError(f"The pseudo-class :{pseudo.ident} is unknown") return method(self.xpath(pseudo.selector))