@@ -77,7 +77,7 @@ def __init__(self, client, name):
7777 ['ds-sc-attr.b2nd', 'lung-jpeg2000_10x.b2nd', 'tomo-guess-test.b2nd']
7878 """
7979 self .client = client
80- urlbase , name = _format_paths (client .urlbase , name )
80+ _ , name = _format_paths (client .urlbase , name )
8181 self .name = name
8282
8383 @property
@@ -934,7 +934,6 @@ def get_roots(self):
934934 >>> roots_dict['b2tests']
935935 {'name': 'b2tests'}
936936 """
937- urlbase , _ = _format_paths (self .urlbase )
938937 return self ._get (f"{ self .urlbase } /api/roots" , auth_cookie = self .cookie , timeout = self .timeout )
939938
940939 def get (self , path ):
@@ -999,7 +998,7 @@ def get_list(self, path):
999998 >>> client.get_list('example')[:3]
1000999 ['README.md', 'dir1/ds-2d.b2nd', 'dir1/ds-3d.b2nd']
10011000 """
1002- urlbase , path = _format_paths (self .urlbase , path )
1001+ _ , path = _format_paths (self .urlbase , path )
10031002 return self ._get (f"{ self .urlbase } /api/list/{ path } " , auth_cookie = self .cookie , timeout = self .timeout )
10041003
10051004 def get_info (self , path ):
@@ -1029,7 +1028,7 @@ def get_info(self, path):
10291028 """
10301029 if isinstance (path , (Dataset , File )):
10311030 path = path .path
1032- urlbase , path = _format_paths (self .urlbase , path )
1031+ _ , path = _format_paths (self .urlbase , path )
10331032 return self ._get (f"{ self .urlbase } /api/info/{ path } " , auth_cookie = self .cookie , timeout = self .timeout )
10341033
10351034 def fetch (self , path , slice_ = None ):
@@ -1159,7 +1158,7 @@ def get_chunk(self, path, nchunk):
11591158 """
11601159 if isinstance (path , Dataset ):
11611160 path = path .path
1162- urlbase , path = _format_paths (self .urlbase , path )
1161+ _ , path = _format_paths (self .urlbase , path )
11631162 data = self ._xget (
11641163 f"{ self .urlbase } /api/chunk/{ path } " ,
11651164 {"nchunk" : nchunk },
@@ -1433,7 +1432,7 @@ def unfold(self, remotepath):
14331432 """
14341433 if isinstance (remotepath , File ):
14351434 remotepath = remotepath .path
1436- urlbase , path = _format_paths (self .urlbase , remotepath )
1435+ _ , path = _format_paths (self .urlbase , remotepath )
14371436 result = self ._post (
14381437 f"{ self .urlbase } /api/unfold/{ path } " , auth_cookie = self .cookie , timeout = self .timeout
14391438 )
@@ -1471,7 +1470,7 @@ def remove(self, path):
14711470 """
14721471 if isinstance (path , File ):
14731472 path = path .path
1474- urlbase , path = _format_paths (self .urlbase , path )
1473+ _ , path = _format_paths (self .urlbase , path )
14751474 result = self ._post (
14761475 f"{ self .urlbase } /api/remove/{ path } " , auth_cookie = self .cookie , timeout = self .timeout
14771476 )
@@ -1510,7 +1509,6 @@ def move(self, src, dst):
15101509 """
15111510 if isinstance (src , File ):
15121511 src = src .path
1513- urlbase , _ = _format_paths (self .urlbase )
15141512 result = self ._post (
15151513 f"{ self .urlbase } /api/move/" ,
15161514 {"src" : str (src ), "dst" : str (dst )},
@@ -1556,7 +1554,6 @@ def copy(self, src, dst):
15561554 """
15571555 if isinstance (src , File ):
15581556 src = src .path
1559- urlbase , _ = _format_paths (self .urlbase )
15601557 result = self ._post (
15611558 f"{ self .urlbase } /api/copy/" ,
15621559 {"src" : str (src ), "dst" : str (dst )},
@@ -1591,7 +1588,7 @@ def _upload_lazyarr(self, remotepath, expression, compute=False):
15911588 Object: Dataset
15921589 Pointer to server-hosted lazy dataset.
15931590 """
1594- urlbase , remotepath = _format_paths (self .urlbase , remotepath )
1591+ _ , remotepath = _format_paths (self .urlbase , remotepath )
15951592 operands = expression .operands if hasattr (expression , "operands" ) else expression .inputs_dict
15961593 if operands is not None :
15971594 operands = {k : str (v ) for k , v in operands .items ()}
@@ -1658,7 +1655,6 @@ def adduser(self, newuser, password=None, superuser=False):
16581655 >>> f"User added: username='{username}' password='foo' superuser=False" == message
16591656 True
16601657 """
1661- urlbase , _ = _format_paths (self .urlbase )
16621658 return self ._post (
16631659 f"{ self .urlbase } /api/adduser/" ,
16641660 {"username" : newuser , "password" : password , "superuser" : superuser },
@@ -1691,7 +1687,6 @@ def deluser(self, user):
16911687 >>> message == f"User deleted: {username}"
16921688 True
16931689 """
1694- urlbase , _ = _format_paths (self .urlbase )
16951690 return self ._get (f"{ self .urlbase } /api/deluser/{ user } " , auth_cookie = self .cookie )
16961691
16971692 def listusers (self , username = None ):
@@ -1729,6 +1724,5 @@ def listusers(self, username=None):
17291724 >>> superuser_info[0]['is_superuser']
17301725 True
17311726 """
1732- urlbase , _ = _format_paths (self .urlbase )
17331727 url = f"{ self .urlbase } /api/listusers/" + (f"?username={ username } " if username else "" )
17341728 return self ._get (url , auth_cookie = self .cookie )
0 commit comments