chore: drop the stale token reader exemption

This commit is contained in:
Abdessamad Derraz committed 2026-11-21 14:58:26 +01:00
1 parent 2f428a01a8
commit 2486c06932
1 file changed
+2 -4
+2 -4
View File
@@ -882,13 +882,11 @@ class PlatformListsNameEveryPlatform(unittest.TestCase):
class NoScriptReadsTheTokenOnItsOwn(unittest.TestCase):
"""Nine scripts read GITHUB_TOKEN from the environment after
github_token() existed, and went anonymous when run on their own.
download.py is the user's downloader: it runs without the repository and
a user's gh session is not its business."""
github_token() existed, and went anonymous when run on their own."""
READS = ('environ.get("GITHUB_TOKEN"', "environ['GITHUB_TOKEN']",
'environ["GITHUB_TOKEN"]', 'environ.get("GH_TOKEN"')
OWNERS = {"scripts/core/github.py", "scripts/download.py"}
OWNERS = {"scripts/core/github.py"}
def test_every_reader_asks_github_token(self):
for path in sorted((REPO_ROOT / "scripts").rglob("*.py")):