From 4ebe4a2089977ff5ab3bdc024adc37878cd8e424 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 14 Sep 2024 22:03:55 +0000 Subject: [PATCH] maintainers/scripts/sha-to-sri: ignore `gemset.nix` files --- maintainers/scripts/sha-to-sri.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintainers/scripts/sha-to-sri.py b/maintainers/scripts/sha-to-sri.py index 971c24fe1fff..bb02a84e7cac 100755 --- a/maintainers/scripts/sha-to-sri.py +++ b/maintainers/scripts/sha-to-sri.py @@ -201,6 +201,10 @@ def fileToSRI(p: Path): _SKIP_RE = re.compile("(generated by)|(do not edit)", re.IGNORECASE) +_IGNORE = frozenset({ + "gemset.nix", + "yarn.nix", +}) if __name__ == "__main__": from sys import argv @@ -239,7 +243,7 @@ if __name__ == "__main__": logger.info("Recursing into directory") for q in p.glob("**/*.nix"): if q.is_file(): - if q.name == "yarn.nix" or q.name.find("generated") != -1: + if q.name in _IGNORE or q.name.find("generated") != -1: logger.info("File looks autogenerated, skipping!") continue