Skip to content

Commit 5e4181a

Browse files
Merge pull request #25 from fcollonval/fcollonval/issue24
Don't list hidden folder
2 parents 286145d + 8dbcbcc commit 5e4181a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jupyterlab-snippets/loader.py

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ def collect_snippets(self):
1515
snippets = []
1616
for root_path in self.snippet_paths:
1717
for dirpath, dirnames, filenames in os.walk(root_path, followlinks=True):
18+
# Remove hidden folder
19+
for folder_i, folder in enumerate(dirnames):
20+
if folder.startswith("."):
21+
dirnames.pop(folder_i)
22+
1823
for f in filenames:
1924
fullpath = PurePath(dirpath).relative_to(root_path).joinpath(f)
2025

0 commit comments

Comments
 (0)