io: Simplify more extensions

This commit is contained in:
2023-06-09 10:57:54 -05:00
parent 25728f5512
commit 40c7f2ffb5

View File

@@ -86,7 +86,8 @@ def read_pkl_gz(filename: str) -> Any:
def _to_h5_filename(data_filename: str) -> str: def _to_h5_filename(data_filename: str) -> str:
output = f"{data_filename}.h5" output = f"{data_filename}.h5"
output = output.replace(".pkl.gz.h5", ".h5") output = output.replace(".gz.h5", ".h5")
output = output.replace(".json.h5", ".h5")
output = output.replace(".pkl.h5", ".h5") output = output.replace(".pkl.h5", ".h5")
output = output.replace(".jld2.h5", ".h5") output = output.replace(".jld2.h5", ".h5")
return output return output