File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import importlib .metadata
2626from packaging .version import Version , parse
2727
28- numpy_version = parse (importlib .metadata .version ('numpy' ))
28+ numpy_version = parse (importlib .metadata .version ("numpy" ))
29+
2930
3031class KwikIO (BaseIO ):
3132 """
@@ -64,10 +65,12 @@ def __init__(self, filename):
6465 """
6566
6667 if numpy_version >= Version ("2.3.0" ):
67- deprecation_msg = ("As the kwik package is no longer actively maintained it only works with NumPy < 2.3.0 and your environment "
68- f"has { numpy_version } . Downgrade your NumPy version to use this IO" )
68+ deprecation_msg = (
69+ "As the kwik package is no longer actively maintained it only works with NumPy < 2.3.0 and your environment "
70+ f"has { numpy_version } . Downgrade your NumPy version to use this IO"
71+ )
6972 raise NeoReadWriteError (deprecation_msg )
70-
73+
7174 from klusta import kwik
7275
7376 BaseIO .__init__ (self )
Original file line number Diff line number Diff line change 77import importlib .metadata
88from packaging .version import Version , parse
99
10- kwik_spec = importlib .util .find_spec (' klusta' )
10+ kwik_spec = importlib .util .find_spec (" klusta" )
1111# kwik no longer works with recent versions of numpy
12- numpy_version = parse (importlib .metadata .version (' numpy' ))
13- numpy_okay = numpy_version < Version (' 2.3.0' )
12+ numpy_version = parse (importlib .metadata .version (" numpy" ))
13+ numpy_okay = numpy_version < Version (" 2.3.0" )
1414if kwik_spec is not None and numpy_okay :
1515 HAVE_KWIK = True
1616else :
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def test_no_sync(self):
7373 with self .assertRaises (ValueError ):
7474 with self .assertWarns (DeprecationWarning ):
7575 rawio_no_sync = OpenEphysBinaryRawIO (
76- self .get_local_path ("openephysbinary/v0.6.x_neuropixels_multiexp_multistream" ), load_sync_channel = True
76+ self .get_local_path ("openephysbinary/v0.6.x_neuropixels_multiexp_multistream" ),
77+ load_sync_channel = True ,
7778 )
7879 rawio_no_sync .parse_header ()
7980
You can’t perform that action at this time.
0 commit comments