From 24feaf5520e41799a2f89ccc2821fd3de7a11f1e Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Mon, 14 Aug 2023 19:29:25 -0400 Subject: [PATCH] flake8 (#1758) --- src/pynwb/misc.py | 2 +- tests/integration/hdf5/test_ecephys.py | 14 ++++++++++++-- tests/unit/test_ecephys.py | 14 ++++++++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/pynwb/misc.py b/src/pynwb/misc.py index 098fce1de..4d977b4f2 100644 --- a/src/pynwb/misc.py +++ b/src/pynwb/misc.py @@ -75,7 +75,7 @@ def __init__(self, **kwargs): {'name': 'features', 'type': (list, np.ndarray), 'doc': 'the feature values for this time point'}) def add_features(self, **kwargs): time, features = getargs('time', 'features', kwargs) - if type(self.timestamps) == list and type(self.data) is list: + if isinstance(self.timestamps, list) and isinstance(self.data, list): self.timestamps.append(time) self.data.append(features) else: diff --git a/tests/integration/hdf5/test_ecephys.py b/tests/integration/hdf5/test_ecephys.py index 9d810270c..df6e81dfa 100644 --- a/tests/integration/hdf5/test_ecephys.py +++ b/tests/integration/hdf5/test_ecephys.py @@ -1,7 +1,17 @@ from hdmf.common import DynamicTableRegion -from pynwb.ecephys import ElectrodeGroup, ElectricalSeries, FilteredEphys, LFP, Clustering, ClusterWaveforms,\ - SpikeEventSeries, EventWaveform, EventDetection, FeatureExtraction +from pynwb.ecephys import ( + ElectrodeGroup, + ElectricalSeries, + FilteredEphys, + LFP, + Clustering, + ClusterWaveforms, + SpikeEventSeries, + EventWaveform, + EventDetection, + FeatureExtraction, +) from pynwb.device import Device from pynwb.file import ElectrodeTable as get_electrode_table from pynwb.testing import NWBH5IOMixin, AcquisitionH5IOMixin, TestCase diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index 6cdfcd59e..26320394b 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -2,8 +2,18 @@ import numpy as np -from pynwb.ecephys import ElectricalSeries, SpikeEventSeries, EventDetection, Clustering, EventWaveform,\ - ClusterWaveforms, LFP, FilteredEphys, FeatureExtraction, ElectrodeGroup +from pynwb.ecephys import ( + ElectricalSeries, + SpikeEventSeries, + EventDetection, + Clustering, + EventWaveform, + ClusterWaveforms, + LFP, + FilteredEphys, + FeatureExtraction, + ElectrodeGroup, +) from pynwb.device import Device from pynwb.file import ElectrodeTable from pynwb.testing import TestCase