diff options
| author | Yuval Adam <_@yuv.al> | 2024-05-09 09:29:47 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2024-05-10 12:55:22 +0200 |
| commit | a234056e66407a99b966623622cc495e57aee3e3 (patch) | |
| tree | 505dde7e9f88624e70b7eb5fa343b2f1c818e041 | |
| parent | 66337d2902eab00f8238b526e5414b4ba263904d (diff) | |
Cleanup some lints
| -rw-r--r-- | cli/__init__.py | 2 | ||||
| -rw-r--r-- | cli/ghpr.py | 5 | ||||
| -rw-r--r-- | cli/scan.py | 6 | ||||
| -rw-r--r-- | manage.py | 1 |
4 files changed, 6 insertions, 8 deletions
diff --git a/cli/__init__.py b/cli/__init__.py index e2ac2c7..fd8ff66 100644 --- a/cli/__init__.py +++ b/cli/__init__.py @@ -4,3 +4,5 @@ from .build import build from .clean import clean from .ghpr import ghpr from .scan import scan + +__all__ = [cli, build, clean, ghpr, scan] diff --git a/cli/ghpr.py b/cli/ghpr.py index 05c08ad..926a338 100644 --- a/cli/ghpr.py +++ b/cli/ghpr.py @@ -1,8 +1,6 @@ import click -import sys from pathlib import Path -from subprocess import run from .base import cli @@ -14,8 +12,7 @@ ROOT_PATH = Path(__file__).parents[1] def ghpr(path): with open(path, "r") as f: for line in f: - l = line.strip().split(",") - domain, handle, name = [x.strip() for x in l] + domain, handle, name = [x.strip() for x in line.strip().split(",")] handle = None if "@" in handle else handle fn = domain.replace(".", "") diff --git a/cli/scan.py b/cli/scan.py index 6319d81..318e68b 100644 --- a/cli/scan.py +++ b/cli/scan.py @@ -26,7 +26,7 @@ class NameScanner: tld.lower() for tld in res.text.strip().split("\n")[1:] if len(tld) < 4 ] f.write("\n".join(tlds).strip()) - TLDS = set(tlds) + _TLDS = set(tlds) def fetch_homepage(self, domain): print(f"Fetching {domain}...", end="") @@ -92,7 +92,7 @@ class NameScanner: with open(DATA_DIR / "homepages" / f"{domain}.html", "w") as out: out.write(res) return len(res) - except Exception as e: + except Exception: return 0 async def fetch_homepages(self, N): @@ -105,7 +105,7 @@ class NameScanner: for name in names: tasks.append(asyncio.ensure_future(self.get_homepage(session, name))) - resps = await asyncio.gather(*tasks) + _resps = await asyncio.gather(*tasks) def find_homepages(self): res = {} @@ -1,4 +1,3 @@ -import os import click from cli import cli |
