Style adjustments by flake8

This commit is contained in:
Karim shoair
2024-11-29 21:14:52 +02:00
parent d6cc07deaa
commit 97fecc9d5f
4 changed files with 13 additions and 13 deletions
+7 -7
View File
@@ -11,12 +11,12 @@ from lxml import html
html_forbidden = {html.HtmlComment, }
logging.basicConfig(
level=logging.ERROR,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler()
]
)
level=logging.ERROR,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler()
]
)
def is_jsonable(content: Union[bytes, str]) -> bool:
@@ -94,7 +94,7 @@ class _StorageTools:
parent = element.getparent()
return tuple(
(element.tag,) if parent is None else (
cls._get_element_path(parent) + (element.tag,)
cls._get_element_path(parent) + (element.tag,)
)
)
+1 -1
View File
@@ -43,7 +43,7 @@ def construct_proxy_dict(proxy_string: Union[str, Dict[str, str]]) -> Union[Dict
}
except ValueError:
# Urllib will say that one of the parameters above can't be casted to the correct type like `int` for port etc...
raise TypeError(f'The proxy argument\'s string is in invalid format!')
raise TypeError('The proxy argument\'s string is in invalid format!')
elif isinstance(proxy_string, dict):
valid_keys = ('server', 'username', 'password', )