Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Ly <[email protected]>
  • Loading branch information
stephprince and rly authored Dec 23, 2024
1 parent a021475 commit f7de447
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Breaking changes
- The validation methods have been updated with multiple breaking changes. @stephprince [#1911](https://github.com/NeurodataWithoutBorders/pynwb/pull/1911)
- The behavior of `pynwb.validate(io=...)` now matches the behavior of `pynwb.validate(path=...)`. In previous pynwb versions, `pynwb.validate(io=...)` did not use the cached namespaces during validation. To obtain the same behavior as in previous versions, you can update the function call to `pynwb.validate(io=..., use_cached_namespaces=False)`
- `pynwb.validate` will return only a list of validation errors instead of a tuple: (list of validation_errors, status code)
- The validate module has been renamed to `validation.py`. The validate method can be
imported using `import pynwb; pynwb.validate` or `from pynwb import validate`

Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_cached_namespaces_to_validate(path: Optional[str] = None,
"default": None,
},
returns="Validation errors in the file.",
rtype=(list, (list, bool)),
rtype=list,
is_method=False,
)
def validate(**kwargs):
Expand Down

0 comments on commit f7de447

Please sign in to comment.