Skip to main content

Add the ability to ignore files in cog_helpers.py

ID
96e824b
date
2023-12-27 23:12:22+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
d4efbc9
message
Add the ability to ignore files in cog_helpers.py
changed files
1 file, 8 additions, 1 deletion

Changed files

cog_helpers.py (2768) → cog_helpers.py (2925)

diff --git a/cog_helpers.py b/cog_helpers.py
index f91534a..6c7de13 100644
--- a/cog_helpers.py
+++ b/cog_helpers.py
@@ -41,9 +41,13 @@ def create_description_table(
     scripts: list[Script],
     repo_name: str = "alexwlchan/scripts",
     primary_branch: str = "main",
+    ignore_files: set[str] | None = None
 ) -> None:
     documented_files = set()
 
+    if ignore_files is None:
+        ignore_files = set()
+
     outl("<dl>")
 
     for i, s in enumerate(scripts, start=1):
@@ -102,7 +106,10 @@ def create_description_table(
         if f in {"README.md", "utf8info.Dockerfile"}:
             continue
 
-        if f.startswith(("test_", "_")):
+        if f.startswith(("test_", "_", ".")):
+            continue
+
+        if f in ignore_files:
             continue
 
         if f not in documented_files: