mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
Fix some PEP 8 issues
This commit is contained in:
@@ -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"]:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user