style: remove unused code

This commit is contained in:
Karim shoair
2025-08-01 05:43:31 +03:00
parent df48662c00
commit f93348b915
-12
View File
@@ -2,7 +2,6 @@ import logging
from itertools import chain
from re import compile as re_compile
from orjson import loads as orjson_loads, JSONDecodeError
from lxml import html
from scrapling.core._types import Any, Dict, Iterable, List
@@ -42,17 +41,6 @@ def setup_logger():
log = setup_logger()
def is_jsonable(content: bytes | str) -> bool:
if isinstance(content, bytes):
content = content.decode()
try:
_ = orjson_loads(content)
return True
except JSONDecodeError:
return False
def flatten(lst: Iterable[Any]) -> List[Any]:
return list(chain.from_iterable(lst))