Fix some PEP 8 issues

This commit is contained in:
sebthom
2022-02-01 06:29:24 +01:00
parent 3e619a2a84
commit 92dbc6615b
3 changed files with 4 additions and 4 deletions

View File

@@ -354,7 +354,7 @@ class KleinanzeigenBot(SeleniumMixin):
try:
self.web_find(By.XPATH, "//*[@id='postad-category-path'][text()]")
is_category_auto_selected = True
except:
except BaseException:
is_category_auto_selected = False
if ad_cfg["category"]:

View File

@@ -143,7 +143,7 @@ def load_dict(filepath:str, content_label:str = "", must_exist = True) -> Option
LOG.info("Loading %s[%s]...", content_label and content_label + " from " or "", filepath)
_, file_ext = os.path.splitext(filepath)
if not file_ext in [ ".json", ".yaml" , ".yml" ]:
if file_ext not in [".json", ".yaml", ".yml"]:
raise ValueError(f'Unsupported file type. The file name "{filepath}" must end with *.json, *.yaml, or *.yml')
if not os.path.exists(filepath):
@@ -159,7 +159,7 @@ def load_dict_from_module(module:ModuleType, filename:str, content_label:str = "
LOG.debug("Loading %s[%s.%s]...", content_label and content_label + " from " or "", module.__name__, filename)
_, file_ext = os.path.splitext(filename)
if not file_ext in [ ".json", ".yaml" , ".yml" ]:
if file_ext not in [".json", ".yaml", ".yml"]:
raise ValueError(f'Unsupported file type. The file name "{filename}" must end with *.json, *.yaml, or *.yml')
try:

View File

@@ -100,7 +100,7 @@ logging-modules = "logging"
[tool.pylint.messages_control]
# https://pylint.pycqa.org/en/latest/technical_reference/features.html#messages-control-options
disable= [
"bare-except",
"broad-except",
"missing-docstring",
"multiple-imports",
"multiple-statements",