Skip to content

Commit 1de9f6c

Browse files
committed
update tools
1 parent 081f662 commit 1de9f6c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/update_intended_for.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def main():
4949
was_str = True
5050
intended_for = [intended_for]
5151

52+
update = False
5253
for i, intended_for_path in enumerate(intended_for):
5354
if intended_for_path.startswith("bids:"):
5455
continue
@@ -59,6 +60,8 @@ def main():
5960
print(f"[red]will not update {intended_for_path}[/red]")
6061
continue
6162

63+
update = True
64+
6265
filename = Path(intended_for_path).name
6366
subject = filename.split("_")[0]
6467

@@ -75,10 +78,9 @@ def main():
7578
if was_str:
7679
intended_for = intended_for[0]
7780

78-
if VERBOSE:
79-
print(intended_for)
80-
81-
if not DRY_RUN:
81+
if update and not DRY_RUN:
82+
if VERBOSE:
83+
print(intended_for)
8284
with open(json_path, "w") as f:
8385
content["IntendedFor"] = intended_for
8486
json.dump(content, f, indent=1)

0 commit comments

Comments
 (0)