Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Oct 4, 2023
1 parent ba4fea1 commit b1b956f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pynwb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ def _dec(cls):
else:
_dec(container_cls)


def get_nwbfile_version(h5py_file: h5py.File):
"""
Get the NWB version of the file if it is an NWB file.
:returns: Tuple consisting of: 1) the original version string as stored in the file and
2) a tuple with the parsed components of the version string, consisting of integers
and strings, e.g., (2, 5, 1, beta). (None, None) will be returned if the file is not a valid NWB file
and strings, e.g., (2, 5, 1, beta). (None, None) will be returned if the file is not a valid NWB file
or the nwb_version is missing, e.g., in the case when no data has been written to the file yet.
"""
# Get the version string for the NWB file
Expand Down Expand Up @@ -238,7 +239,6 @@ def can_read(path: str):
except IOError:
return False

Check warning on line 240 in src/pynwb/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pynwb/__init__.py#L238-L240

Added lines #L238 - L240 were not covered by tests


@docval({'name': 'path', 'type': (str, Path), 'doc': 'the path to the HDF5 file', 'default': None},
{'name': 'mode', 'type': str,
'doc': 'the mode to open the HDF5 file with, one of ("w", "r", "r+", "a", "w-", "x")',
Expand Down

0 comments on commit b1b956f

Please sign in to comment.