From 99a0b05f2a3cda12931c576dae70d76717f98b62 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 12 Jun 2023 13:47:21 +0200 Subject: [PATCH] Fixed: - 'redefined-outer-name' lint fixed - 'bad-indentation ' lint fixed --- fba/fba.py | 32 ++++++++++++++++---------------- fba/instances.py | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/fba/fba.py b/fba/fba.py index 05723d1..e422462 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -122,27 +122,27 @@ def process_domain(domain: str, blocker: str, command: str) -> bool: raise ValueError("Parameter 'command' is empty") if domain.find("*") > 0: - # Try to de-obscure it - row = instances.deobscure("*", domain) + # Try to de-obscure it + row = instances.deobscure("*", domain) - # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") - if row is None: - print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") - return False + # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") + if row is None: + print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") + return False - # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") - domain = row[0] + # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") + domain = row[0] elif domain.find("?") > 0: - # Try to de-obscure it - row = instances.deobscure("?", domain) + # Try to de-obscure it + row = instances.deobscure("?", domain) - # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") - if row is None: - print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") - return False + # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") + if row is None: + print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") + return False - # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") - domain = row[0] + # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") + domain = row[0] if not validators.domain(domain): print(f"WARNING: domain='{domain}' is not a valid domain - skipped!") diff --git a/fba/instances.py b/fba/instances.py index aa912e0..4ed93bf 100644 --- a/fba/instances.py +++ b/fba/instances.py @@ -81,15 +81,15 @@ def has_pending(domain: str) -> bool: elif domain == "": raise ValueError("Parameter 'domain' is empty") - has_pending = False + has = False for key in _pending: # DEBUG: print(f"DEBUG: key='{key}',domain='{domain}',_pending[key]()='{len(_pending[key])}'") if domain in _pending[key]: - has_pending = True + has = True break - # DEBUG: print(f"DEBUG: has_pending='{has_pending}' - EXIT!") - return has_pending + # DEBUG: print(f"DEBUG: has='{has}' - EXIT!") + return has def update_data(domain: str): # DEBUG: print(f"DEBUG: domain='{domain}' - CALLED!") -- 2.39.5