style: Removing dead code/docstrings and correcting type hints

This commit is contained in:
Karim shoair
2025-09-19 04:49:30 +03:00
parent bf5fe6d451
commit a9d05cc0ef
5 changed files with 8 additions and 16 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ class Selector(SelectorsGeneration):
)
def __handle_element(
self, element: HtmlElement | _ElementUnicodeResult
self, element: Optional[HtmlElement | _ElementUnicodeResult]
) -> Optional[Union[TextHandler, "Selector"]]:
"""Used internally in all functions to convert a single element to type (Selector|TextHandler) when possible"""
if element is None:
@@ -345,7 +345,7 @@ class Selector(SelectorsGeneration):
return TextHandler(content)
@property
def body(self):
def body(self) -> str | bytes:
"""Return the raw body of the current `Selector` without any processing. Useful for binary and non-HTML requests."""
return self._raw_body