From 3cca3fd56b5476f2d1f76a509be8c20daf384a80 Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Sat, 21 Dec 2024 16:17:02 +0200 Subject: [PATCH] style(parser): more accurate type hints --- scrapling/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapling/parser.py b/scrapling/parser.py index c82a270..1a46f1a 100644 --- a/scrapling/parser.py +++ b/scrapling/parser.py @@ -474,7 +474,7 @@ class Adaptor(SelectorsGeneration): def css(self, selector: str, identifier: str = '', auto_match: bool = False, auto_save: bool = False, percentage: int = 0 - ) -> Union['Adaptors[Adaptor]', List]: + ) -> Union['Adaptors[Adaptor]', List, 'TextHandlers[TextHandler]']: """Search current tree with CSS3 selectors **Important: @@ -517,7 +517,7 @@ class Adaptor(SelectorsGeneration): def xpath(self, selector: str, identifier: str = '', auto_match: bool = False, auto_save: bool = False, percentage: int = 0, **kwargs: Any - ) -> Union['Adaptors[Adaptor]', List]: + ) -> Union['Adaptors[Adaptor]', List, 'TextHandlers[TextHandler]']: """Search current tree with XPath selectors **Important: