Skip to content

Commit

Permalink
removed if condition by regex
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaenzig committed Nov 13, 2024
1 parent 3b466ff commit 08a3c8a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import functools
import hashlib
import os
import re
from glob import glob
from pathlib import Path
from typing import Any, Callable, Dict, List, Literal, Tuple
Expand Down Expand Up @@ -326,7 +327,7 @@ def _fetch_samples_dirs(self) -> List[str]:
sample_filenames = [
filename
for filename in os.listdir(self._root)
if os.path.isdir(os.path.join(self._root, filename)) and filename != "processed"
if os.path.isdir(os.path.join(self._root, filename)) and re.match(r"^s\d{4}$", filename)
]
return sorted(sample_filenames)

Expand Down

0 comments on commit 08a3c8a

Please sign in to comment.