refactor: share the scrapers' fetch helpers

This commit is contained in:
Abdessamad Derraz committed 2026-11-18 13:38:44 +01:00
1 parent a5834a4b8a
commit 6f8b8dedb2
12 files changed
+89 -171

No files matched your search

+3 -1
View File
@@ -787,10 +787,12 @@ class EveryGitHubApiCallerSendsTheToken(unittest.TestCase):
for path in [*scripts.rglob("*.py"), *scripts.rglob("*.sh")]
if "api.github.com" in (source := path.read_text(encoding="utf-8"))
# arcade_parent_importer names API URLs and sends them through
# romset_dat_importer._api_json, which holds the token.
# romset_dat_importer._api_json, which holds the token, and the
# scrapers through base_scraper.github_json.
and ("Request(" in source or "urlopen(" in source or path.suffix == ".sh")
and "GITHUB_TOKEN" not in source
and "github_headers(" not in source
and "github_json(" not in source
and "github_token(" not in source
)
self.assertEqual(silent, [])