File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ def __repr__(self):
165165 template = "\n {} {}\n Fields:\n " "" .format (getattr (self , 'name' ), type (self ))
166166 for k in sorted (self .fields ): # sorted to enable tests
167167 v = self .fields [k ]
168- template += " {}: {}\n " .format (k , self .__smart_str (v , 1 ))
168+ if not hasattr (v , '__len__' ) or len (v ) > 0 :
169+ template += " {}: {}\n " .format (k , self .__smart_str (v , 1 ))
169170 return template
170171
171172 @staticmethod
Original file line number Diff line number Diff line change @@ -335,22 +335,11 @@ def test_print_file(self):
335335 name <class 'pynwb.base.TimeSeries'>,
336336 name2 <class 'pynwb.base.TimeSeries'>
337337 }
338- analysis: { }
339- devices: { }
340- electrode_groups: { }
341338 epoch_tags: {
342339 tag1,
343340 tag2
344341 }
345342 epochs: epochs <class 'pynwb.epoch.TimeIntervals'>
346- ic_electrodes: { }
347- imaging_planes: { }
348- intervals: { }
349- lab_meta_data: { }
350- ogen_sites: { }
351- processing: { }
352- stimulus: { }
353- stimulus_template: { }
354343""" )
355344
356345
You can’t perform that action at this time.
0 commit comments