@@ -1275,7 +1275,7 @@ def __getitem__(self, key):
1275
1275
1276
1276
def setitems (self , values ):
1277
1277
if self .mode == "r" :
1278
- raise ReadOnlyError ()
1278
+ raise ReadOnlyError
1279
1279
1280
1280
# Normalize keys and make sure the values are bytes
1281
1281
values = {
@@ -1286,7 +1286,7 @@ def setitems(self, values):
1286
1286
1287
1287
def __setitem__ (self , key , value ):
1288
1288
if self .mode == "r" :
1289
- raise ReadOnlyError ()
1289
+ raise ReadOnlyError
1290
1290
key = self ._normalize_key (key )
1291
1291
value = ensure_contiguous_ndarray_or_bytes (value )
1292
1292
path = self .dir_path (key )
@@ -1300,7 +1300,7 @@ def __setitem__(self, key, value):
1300
1300
1301
1301
def __delitem__ (self , key ):
1302
1302
if self .mode == "r" :
1303
- raise ReadOnlyError ()
1303
+ raise ReadOnlyError
1304
1304
key = self ._normalize_key (key )
1305
1305
path = self .dir_path (key )
1306
1306
if self .fs .isdir (path ):
@@ -1310,7 +1310,7 @@ def __delitem__(self, key):
1310
1310
1311
1311
def delitems (self , keys ):
1312
1312
if self .mode == "r" :
1313
- raise ReadOnlyError ()
1313
+ raise ReadOnlyError
1314
1314
# only remove the keys that exist in the store
1315
1315
nkeys = [self ._normalize_key (key ) for key in keys if key in self ]
1316
1316
# rm errors if you pass an empty collection
@@ -1369,7 +1369,7 @@ def listdir(self, path=None):
1369
1369
1370
1370
def rmdir (self , path = None ):
1371
1371
if self .mode == "r" :
1372
- raise ReadOnlyError ()
1372
+ raise ReadOnlyError
1373
1373
store_path = self .dir_path (path )
1374
1374
if self .fs .isdir (store_path ):
1375
1375
self .fs .rm (store_path , recursive = True )
@@ -1380,7 +1380,7 @@ def getsize(self, path=None):
1380
1380
1381
1381
def clear (self ):
1382
1382
if self .mode == "r" :
1383
- raise ReadOnlyError ()
1383
+ raise ReadOnlyError
1384
1384
self .map .clear ()
1385
1385
1386
1386
@classmethod
@@ -1670,7 +1670,7 @@ def __getitem__(self, key):
1670
1670
1671
1671
def __setitem__ (self , key , value ):
1672
1672
if self .mode == "r" :
1673
- raise ReadOnlyError ()
1673
+ raise ReadOnlyError
1674
1674
value = ensure_contiguous_ndarray_like (value ).view ("u1" )
1675
1675
with self .mutex :
1676
1676
# writestr(key, value) writes with default permissions from
@@ -1752,7 +1752,7 @@ def getsize(self, path=None):
1752
1752
1753
1753
def clear (self ):
1754
1754
if self .mode == "r" :
1755
- raise ReadOnlyError ()
1755
+ raise ReadOnlyError
1756
1756
with self .mutex :
1757
1757
self .close ()
1758
1758
os .remove (self .path )
@@ -2810,10 +2810,10 @@ def __len__(self):
2810
2810
return len (self .meta_store )
2811
2811
2812
2812
def __delitem__ (self , key ):
2813
- raise ReadOnlyError ()
2813
+ raise ReadOnlyError
2814
2814
2815
2815
def __setitem__ (self , key , value ):
2816
- raise ReadOnlyError ()
2816
+ raise ReadOnlyError
2817
2817
2818
2818
def getsize (self , path ):
2819
2819
return getsize (self .meta_store , path )
0 commit comments