Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Dec 22, 2024
1 parent bb2d82d commit 7ec06b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pynwb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def __init__(self, **kwargs):
super().__init__(**kwargs)
if notes != '':
self._error_on_new_pass_on_construct(
error_msg=("The `notes` argument of ScratchData.__init__ has been deprecated and will be removed in PyNWB 4.0. "
"Use description instead.")
error_msg=("The `notes` argument of ScratchData.__init__ has been deprecated and "
"will be removed in PyNWB 4.0. Use description instead.")
)
if notes != '' and description is not None:
raise ValueError('Cannot provide both notes and description to ScratchData.__init__. The description '
Expand Down
3 changes: 2 additions & 1 deletion src/pynwb/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,8 @@ def _check_sweep_table(self):
"""
if self.sweep_table is None:
if self._in_construct_mode:
# Construct the SweepTable without triggering errors in construct mode because SweepTable has been deprecated
# Construct the SweepTable without triggering errors in construct mode because
# SweepTable has been deprecated
sweep_table = SweepTable.__new__(SweepTable, parent=self, in_construct_mode=True)
sweep_table.__init__(name='sweep_table')
sweep_table._in_construct_mode = False
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_icephys_metadata_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ def test_deprecate_simultaneous_recordings_on_add_stimulus(self):
with self.assertRaisesWith(ValueError, msg):
nwbfile.add_stimulus(stimulus, use_sweep_table=True)

# shoudl not error when in construct mode
# test that adding a stimulus does not error when in construct mode
nwbfile._in_construct_mode = True
nwbfile.add_stimulus(stimulus2, use_sweep_table=True)

Expand Down

0 comments on commit 7ec06b0

Please sign in to comment.