Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 11, 2025
1 parent ca4034b commit 1d748c5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/dxtbx/format/FormatNXmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ class FormatNXmx(FormatNexus):
@staticmethod
def understand(image_file):
with h5py.File(image_file) as handle:
return bool(
[
entry
for entry in nxmx.find_class(handle, "NXentry")
if "definition" in entry
and nxmx.h5str(entry["definition"][()]) == "NXmx"
]
) and "/entry/data/data" in handle
return (
bool(
[
entry
for entry in nxmx.find_class(handle, "NXentry")
if "definition" in entry
and nxmx.h5str(entry["definition"][()]) == "NXmx"
]
)
and "/entry/data/data" in handle
)

def __init__(self, image_file, **kwargs):
"""Initialise the image structure from the given file."""
Expand Down

0 comments on commit 1d748c5

Please sign in to comment.