Skip to content

Commit 03f20ff

Browse files
committed
fix formatting
1 parent 20d92c9 commit 03f20ff

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/pynwb/ophys.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ class ImagingPlane(NWBContainer):
6969
{'name': 'optical_channel', 'type': (list, OpticalChannel), # required
7070
'doc': 'One of possibly many groups storing channel-specific data.'},
7171
{'name': 'description', 'type': str, 'doc': 'Description of this ImagingPlane.', 'default': None},
72-
{'name': 'device', 'type': Device, 'doc': 'the device that was used to record', 'default': None}, # required
73-
{'name': 'excitation_lambda', 'type': float, 'doc': 'Excitation wavelength in nm.', 'default': None}, # required
72+
{'name': 'device', 'type': Device, 'doc': 'the device that was used to record',
73+
'default': None}, # required
74+
{'name': 'excitation_lambda', 'type': float, 'doc': 'Excitation wavelength in nm.',
75+
'default': None}, # required
7476
{'name': 'indicator', 'type': str, 'doc': 'Calcium indicator', 'default': None}, # required
7577
{'name': 'location', 'type': str, 'doc': 'Location of image plane.', 'default': None}, # required
7678
{'name': 'imaging_rate', 'type': float,
@@ -130,8 +132,8 @@ def __init__(self, **kwargs):
130132
args_to_set['optical_channel'] = [args_to_set['optical_channel']]
131133

132134
# Note: device, excitation_lambda, indicator, and location are required arguments.
133-
# Description was made to be optional in PyNWB 3.1.0, however to avoid breaking API changes,
134-
# the order of the arguments needs to be maintained even though the optional arguments came before the required ones.
135+
# Description was made to be optional in PyNWB 3.1.0, however to avoid breaking API changes the order of
136+
# the arguments needs to be maintained even though the optional arguments came before the required ones.
135137
# So in docval these required arguments are displayed as optional when really they are required.
136138
# This section can be removed when positional arguments are no longer allowed.
137139
if args_to_set['device'] is None:

tests/unit/test_ophys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_init_description_optional(self):
217217
self.assertIsNone(ip.description)
218218

219219
# description is still required to be provided when using positional arguments
220-
with warnings.catch_warnings(record=True) as w: # catch positional argument deprecation warning
220+
with warnings.catch_warnings(record=True): # catch positional argument deprecation warning
221221
with self.assertRaises(TypeError):
222222
ImagingPlane(
223223
'test_imaging_plane',

0 commit comments

Comments
 (0)