File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def get_version_number(filepath: str) -> int:
2929 """
3030 # Ensure the input is a string and extract the version part.
3131 if not isinstance (filepath , str ):
32- raise ValueError (f"Expected a string for filepath, got { type ( filepath ) } " )
32+ raise ValueError (f"Expected a string for filepath, got { filepath } " )
3333
3434 # Extract the version number by splitting the string at '_v' and '.'
3535 version_str = filepath .split ("_v" )[- 1 ].split ("." )[0 ]
@@ -91,7 +91,7 @@ def get_latest_fileversions(glob_list_path: list[str]) -> list[str]:
9191 latest_files = get_latest_fileversions(all_files)
9292 """
9393 # Extract unique base names by splitting before the version part
94- uniques = set ( file .rsplit ("_v" , 1 )[0 ] for file in glob_list_path )
94+ uniques = [ file .rsplit ("_v" , 1 )[0 ] for file in glob_list_path ]
9595 result = []
9696
9797 for unique in uniques :
@@ -117,7 +117,7 @@ def get_latest_fileversions(glob_list_path: list[str]) -> list[str]:
117117 # Sort the collected entries by version number and get the latest one
118118 if unique_sorter :
119119 latest_entry = max (unique_sorter , key = lambda x : x [0 ])[1 ]
120- logger .info (f"Choosing : { latest_entry .rsplit ('/' , 1 )[- 1 ]} " )
120+ logger .info (f"Latest version(s) : { latest_entry .rsplit ('/' , 1 )[- 1 ]} " )
121121 result .append (latest_entry )
122122
123123 return result
You can’t perform that action at this time.
0 commit comments