Fixed:
authorRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 11:47:21 +0000 (13:47 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 11:48:50 +0000 (13:48 +0200)
- 'redefined-outer-name' lint fixed
- 'bad-indentation ' lint fixed

fba/fba.py
fba/instances.py

index 05723d195d2612c2d415ff76337bdd5a21c6b06b..e4224623c85a1e98239d3aa0edaa2e39c291321e 100644 (file)
@@ -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!")
index aa912e0d865635f38e84e83e306097c89fd57628..4ed93bfb432e7db18ba732c52b64c54b181c62ab 100644 (file)
@@ -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!")