Skip to content

Commit

Permalink
compare strings
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jul 30, 2024
1 parent dce5638 commit a93be66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions weldx/asdf/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@


def asdf_open_memory_mapping_kwarg(memmap: bool) -> dict:
if tuple(int(part) for part in importlib.metadata.version("asdf").split(".")) >= (
3,
1,
0,
if tuple(importlib.metadata.version("asdf").split(".")) >= (
"3",
"1",
"0",
):
return {"memmap": memmap}
else:
Expand Down
4 changes: 2 additions & 2 deletions weldx/asdf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def read_buffer_context(
open_kwargs = {"memmap": False, "lazy_load": False}

if "memmap" in open_kwargs and tuple(
int(part) for part in importlib.metadata.version("asdf").split(".")
) < (3, 1, 0):
importlib.metadata.version("asdf").split(".")
) < ("3", "1", "0"):
open_kwargs["copy_arrays"] = not open_kwargs["memmap"]
del open_kwargs["memmap"]

Check warning on line 168 in weldx/asdf/util.py

View check run for this annotation

Codecov / codecov/patch

weldx/asdf/util.py#L167-L168

Added lines #L167 - L168 were not covered by tests

Expand Down

0 comments on commit a93be66

Please sign in to comment.