From 6eeca3daa706c5878bf10087a8c15c62c8f3159f Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Thu, 31 Oct 2024 01:32:53 +0300 Subject: [PATCH] Going back to single utils file and using the new types file --- scrapling/{utils/__init__.py => utils.py} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename scrapling/{utils/__init__.py => utils.py} (98%) diff --git a/scrapling/utils/__init__.py b/scrapling/utils.py similarity index 98% rename from scrapling/utils/__init__.py rename to scrapling/utils.py index 3defaf4..5f8efc9 100644 --- a/scrapling/utils/__init__.py +++ b/scrapling/utils.py @@ -4,9 +4,10 @@ from itertools import chain # Using cache on top of a class is brilliant way to achieve Singleton design pattern without much code from functools import lru_cache as cache # functools.cache is available on Python 3.9+ only so let's keep lru_cache -from typing import Dict, Iterable, Any +from scrapling._types import Dict, Iterable, Any from lxml import html + html_forbidden = {html.HtmlComment, } logging.basicConfig( level=logging.ERROR,