@sablier/devkit 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/just/csv.just +9 -1
- package/package.json +1 -1
package/just/csv.just
CHANGED
|
@@ -16,6 +16,14 @@ _csv-check glob="data/*/*.{csv,tsv}" schema="" ignore="*.invalid *.valid *valida
|
|
|
16
16
|
import subprocess
|
|
17
17
|
import sys
|
|
18
18
|
|
|
19
|
+
def expand_braces(pattern):
|
|
20
|
+
"""Expand brace patterns like {a,b} into multiple patterns."""
|
|
21
|
+
match = re.search(r'\{([^}]+)\}', pattern)
|
|
22
|
+
if not match:
|
|
23
|
+
return [pattern]
|
|
24
|
+
prefix, suffix = pattern[:match.start()], pattern[match.end():]
|
|
25
|
+
return [p for opt in match.group(1).split(',') for p in expand_braces(prefix + opt + suffix)]
|
|
26
|
+
|
|
19
27
|
# Check qsv is available
|
|
20
28
|
if subprocess.run(["which", "qsv"], capture_output=True).returncode != 0:
|
|
21
29
|
print("✗ qsv CLI not found")
|
|
@@ -39,7 +47,7 @@ _csv-check glob="data/*/*.{csv,tsv}" schema="" ignore="*.invalid *.valid *valida
|
|
|
39
47
|
ext_label = 'CSV/TSV'
|
|
40
48
|
|
|
41
49
|
print(f"Validating {ext_label} files...")
|
|
42
|
-
files = globmod.glob(
|
|
50
|
+
files = [f for pattern in expand_braces(globs) for f in globmod.glob(pattern)]
|
|
43
51
|
|
|
44
52
|
# Filter ignored files
|
|
45
53
|
files = [f for f in files if not any(fnmatch.fnmatch(f, p) for p in ignore_patterns)]
|
package/package.json
CHANGED