diff --git a/doc/source/conf.py b/doc/source/conf.py index 1b598de51..8f8220c54 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -247,9 +247,7 @@ rst_epilog = """ .. |neo_github_url| replace:: https://github.com/NeuralEnsemble/python-neo/archive/neo-{}.zip -""".format( - neo_release -) +""".format(neo_release) sphinx_gallery_conf = { # 'only_warn_on_example_error': True, # helps with debugging broken examples diff --git a/examples/convert_to_nwb.py b/examples/convert_to_nwb.py index fb4fd906d..7daaf7ae2 100644 --- a/examples/convert_to_nwb.py +++ b/examples/convert_to_nwb.py @@ -8,7 +8,6 @@ from urllib.parse import quote from neo.io import get_io - dataset_url = "https://object.cscs.ch/v1/AUTH_63ea6845b1d34ad7a43c8158d9572867/hbp-d000017_PatchClamp-GranuleCells_pub" folder = "GrC_Subject15_180116" diff --git a/examples/plot_imageseq.py b/examples/plot_imageseq.py index a482784c1..afb9f0704 100644 --- a/examples/plot_imageseq.py +++ b/examples/plot_imageseq.py @@ -14,7 +14,6 @@ import random - ############################################################ # Now we need to generate some data # We will just make a nice box and then we can attach this diff --git a/examples/plot_read_proxy_with_lazy_load.py b/examples/plot_read_proxy_with_lazy_load.py index 66b2777ff..b27d683ed 100644 --- a/examples/plot_read_proxy_with_lazy_load.py +++ b/examples/plot_read_proxy_with_lazy_load.py @@ -14,7 +14,6 @@ import quantities as pq import numpy as np - ############################################### # Let's get a file # NeuralEnsemble maintains a wide variety of small test diff --git a/neo/core/analogsignal.py b/neo/core/analogsignal.py index f930a5d95..2e94cee4e 100644 --- a/neo/core/analogsignal.py +++ b/neo/core/analogsignal.py @@ -523,10 +523,8 @@ def time_slice(self, t_start, t_stop): j = i + int(np.rint(delta.simplified.magnitude)) if (i < 0) or (j > len(self)): - raise ValueError( - "t_start, t_stop have to be within the analog \ - signal duration" - ) + raise ValueError("t_start, t_stop have to be within the analog \ + signal duration") # Time slicing should create a deep copy of the object obj = deepcopy(self[i:j]) diff --git a/neo/io/elphyio.py b/neo/io/elphyio.py index 023ae8213..590133af6 100644 --- a/neo/io/elphyio.py +++ b/neo/io/elphyio.py @@ -89,7 +89,6 @@ # to import from core from neo.core import Block, Segment, AnalogSignal, Event, SpikeTrain, NeoReadWriteError - # -------------------------------------------------------- # OBJECTS diff --git a/neo/io/nestio.py b/neo/io/nestio.py index c2a804835..cea34cec0 100644 --- a/neo/io/nestio.py +++ b/neo/io/nestio.py @@ -111,7 +111,7 @@ def __read_analogsignals( t_start, t_stop = self._check_input_times(t_start, t_stop, mandatory=False) # checking value input parameters - (value_columns, value_types, value_units) = self._check_input_values_parameters( + value_columns, value_types, value_units = self._check_input_values_parameters( value_columns, value_types, value_units ) @@ -133,7 +133,7 @@ def __read_analogsignals( ) # extracting condition and sorting parameters for raw data loading - (condition, condition_column, sorting_column) = self._get_conditions_and_sorting( + condition, condition_column, sorting_column = self._get_conditions_and_sorting( id_column, time_column, gid_list, t_start, t_stop ) # loading raw data columns @@ -210,7 +210,7 @@ def __read_spiketrains(self, gdf_id_list, time_unit, t_start, t_stop, id_column, if cid is None: column_ids[i] = -1 - (condition, condition_column, sorting_column) = self._get_conditions_and_sorting( + condition, condition_column, sorting_column = self._get_conditions_and_sorting( id_column, time_column, gdf_id_list, t_start, t_stop ) diff --git a/neo/io/nixio.py b/neo/io/nixio.py index 8b03503a1..2922138f8 100644 --- a/neo/io/nixio.py +++ b/neo/io/nixio.py @@ -19,7 +19,6 @@ Neo: https://github.com/G-Node/python-neo/wiki """ - from datetime import date, time, datetime from collections.abc import Iterable from collections import OrderedDict @@ -49,7 +48,6 @@ from ..io.proxyobjects import BaseProxy from .. import __version__ as neover - datetime_types = (date, time, datetime) EMPTYANNOTATION = "EMPTYLIST" diff --git a/neo/io/nwbio.py b/neo/io/nwbio.py index b2ed49038..55e5048a3 100644 --- a/neo/io/nwbio.py +++ b/neo/io/nwbio.py @@ -34,7 +34,6 @@ SpikeTrainProxy as BaseSpikeTrainProxy, ) - logger = logging.getLogger("Neo") GLOBAL_ANNOTATIONS = ( diff --git a/neo/io/proxyobjects.py b/neo/io/proxyobjects.py index 1fb8834a9..fe366ed12 100644 --- a/neo/io/proxyobjects.py +++ b/neo/io/proxyobjects.py @@ -19,7 +19,6 @@ from neo.core import AnalogSignal, Epoch, Event, SpikeTrain from neo.core.dataobject import ArrayDict - logger = logging.getLogger("Neo") diff --git a/neo/rawio/baserawio.py b/neo/rawio/baserawio.py index b0685593e..47e3572eb 100644 --- a/neo/rawio/baserawio.py +++ b/neo/rawio/baserawio.py @@ -79,7 +79,6 @@ from .utils import get_memmap_chunk_from_opened_file - possible_raw_modes = [ "one-file", "multi-file", @@ -262,8 +261,7 @@ def _repr_html_(self): html.append(f"
nb_segment: {nb_seg}
") # CSS for tables - using only black, white, and gray colors - html.append( - """ + html.append(""" - """ - ) + """) # Signal Streams signal_streams = self.header["signal_streams"] diff --git a/neo/rawio/nixrawio.py b/neo/rawio/nixrawio.py index 75dbe122a..896fbca2c 100644 --- a/neo/rawio/nixrawio.py +++ b/neo/rawio/nixrawio.py @@ -19,7 +19,6 @@ ) from ..io.nixio import check_nix_version - # When reading metadata properties, the following keys are ignored since they # are used to store Neo object properties. # This dictionary is used in the _filter_properties() method. diff --git a/neo/rawio/openephysrawio.py b/neo/rawio/openephysrawio.py index 4c3e84496..3e6ef0e07 100644 --- a/neo/rawio/openephysrawio.py +++ b/neo/rawio/openephysrawio.py @@ -23,7 +23,6 @@ ) from neo.core import NeoReadWriteError - RECORD_SIZE = 1024 HEADER_SIZE = 1024 diff --git a/neo/test/coretest/test_block.py b/neo/test/coretest/test_block.py index b6469bdd3..c46f7aaf5 100644 --- a/neo/test/coretest/test_block.py +++ b/neo/test/coretest/test_block.py @@ -24,7 +24,6 @@ from neo.test.tools import assert_neo_object_is_compliant, assert_same_sub_schema from neo.test.generate_datasets import random_block, simple_block, random_signal - N_EXAMPLES = 5 diff --git a/neo/test/coretest/test_segment.py b/neo/test/coretest/test_segment.py index 6390e6cfe..496515ad9 100644 --- a/neo/test/coretest/test_segment.py +++ b/neo/test/coretest/test_segment.py @@ -27,7 +27,6 @@ from neo.rawio.examplerawio import ExampleRawIO from neo.io.proxyobjects import AnalogSignalProxy, SpikeTrainProxy, EventProxy, EpochProxy - N_EXAMPLES = 5 diff --git a/neo/test/iotest/common_io_test.py b/neo/test/iotest/common_io_test.py index 549af6550..7607e58e1 100644 --- a/neo/test/iotest/common_io_test.py +++ b/neo/test/iotest/common_io_test.py @@ -471,9 +471,7 @@ def test_create_group_across_segment(self): Test read_block method of BaseFromRaw with different test cases for create_group_across_segment. - """.format( - io_name=self.ioclass.__name__ - ) + """.format(io_name=self.ioclass.__name__) test_cases = [ {"SpikeTrain": True}, diff --git a/neo/test/iotest/test_mearecio.py b/neo/test/iotest/test_mearecio.py index 161b5bfc3..ae24b3798 100644 --- a/neo/test/iotest/test_mearecio.py +++ b/neo/test/iotest/test_mearecio.py @@ -7,7 +7,6 @@ from neo.io import MEArecIO from neo.test.iotest.common_io_test import BaseTestIO - try: import MEArec as mr diff --git a/neo/test/iotest/test_plexon2io.py b/neo/test/iotest/test_plexon2io.py index 574d64d6f..ea57767e0 100644 --- a/neo/test/iotest/test_plexon2io.py +++ b/neo/test/iotest/test_plexon2io.py @@ -10,7 +10,6 @@ from neo.test.rawiotest.test_plexon2rawio import TestPlexon2RawIO - try: from neo.rawio.plexon2rawio.pypl2 import pypl2lib diff --git a/neo/test/rawiotest/test_alphaomegarawio.py b/neo/test/rawiotest/test_alphaomegarawio.py index bf1e8b1d4..533c3ae58 100644 --- a/neo/test/rawiotest/test_alphaomegarawio.py +++ b/neo/test/rawiotest/test_alphaomegarawio.py @@ -32,7 +32,6 @@ class and a full test will be done to test if the new coded IO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO - logging.getLogger().setLevel(logging.INFO) diff --git a/neo/test/rawiotest/test_mearecrawio.py b/neo/test/rawiotest/test_mearecrawio.py index 937b0e2ab..7d36cd4f2 100644 --- a/neo/test/rawiotest/test_mearecrawio.py +++ b/neo/test/rawiotest/test_mearecrawio.py @@ -9,7 +9,6 @@ from neo.test.rawiotest.common_rawio_test import BaseTestRawIO - try: import MEArec as mr diff --git a/neo/test/rawiotest/test_nixrawio.py b/neo/test/rawiotest/test_nixrawio.py index 2f86c99b0..9e69fed1c 100644 --- a/neo/test/rawiotest/test_nixrawio.py +++ b/neo/test/rawiotest/test_nixrawio.py @@ -2,7 +2,6 @@ from neo.rawio.nixrawio import NIXRawIO from neo.test.rawiotest.common_rawio_test import BaseTestRawIO - testfname = "" diff --git a/neo/test/rawiotest/tools.py b/neo/test/rawiotest/tools.py index 0bfbc7c0a..b658455ed 100644 --- a/neo/test/rawiotest/tools.py +++ b/neo/test/rawiotest/tools.py @@ -6,7 +6,6 @@ import os import importlib.util - logger = logging.getLogger("neo.test")