Skip to content

Commit 26a46dc

Browse files
committed
blacked
1 parent cf44853 commit 26a46dc

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

testing/test_update_version.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
CliCase(
2222
should_succeed=True,
2323
old_way_lines=[
24+
# long and short versions
2425
"--old-version 0.18 --new-version 0.19",
2526
"-ov 0.18 -nv 0.19",
2627
],
@@ -29,6 +30,7 @@
2930
CliCase(
3031
should_succeed=False,
3132
old_way_lines=[
33+
# both args are required
3234
"-ov 0.18",
3335
"-nv 0.19",
3436
],

update_version.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,11 @@ def in_place_string_replace(filename: str, old_string: str, new_string: str) ->
2323
def _update_version(old_version: str, new_version: str):
2424
cwd = os.getcwd()
2525
in_place_string_replace(
26-
os.path.join(cwd, "GANDLF/version.py"),
27-
old_version,
28-
new_version,
26+
os.path.join(cwd, "GANDLF/version.py"), old_version, new_version
2927
)
3028

3129
# find all yaml files in samples and testing directories
32-
folders_to_iterate = [
33-
os.path.join(cwd, "samples"),
34-
os.path.join(cwd, "testing"),
35-
]
30+
folders_to_iterate = [os.path.join(cwd, "samples"), os.path.join(cwd, "testing")]
3631

3732
files_where_version_is_stored = [
3833
os.path.join(cwd, "mlcube/model_mlcube/workspace/config.yml"),

0 commit comments

Comments
 (0)