Skip to content

Commit 93e61f4

Browse files
authored
Merge pull request #378 from chrishalcrow/remove-scripts-from-github-folders
Remove "scripts" from items in list_github_folders
2 parents 563f5b5 + 696427b commit 93e61f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/probeinterface/library.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,8 @@ def list_github_folders(owner: str, repo: str, path: str = "", ref: str = None,
289289
if resp.status_code != 200:
290290
raise RuntimeError(f"GitHub API returned status {resp.status_code}: {resp.text}")
291291
items = resp.json()
292-
return [item["name"] for item in items if item.get("type") == "dir" and item["name"][0] != "."]
292+
return [
293+
item["name"]
294+
for item in items
295+
if item.get("type") == "dir" and item["name"][0] != "." and item["name"] != "scripts"
296+
]

0 commit comments

Comments
 (0)