@@ -115,9 +115,9 @@ def test_bad_upload_types(self, dbx):
115115 def test_team (self , dbxt ):
116116 dbxt .team_groups_list ()
117117 r = dbxt .team_members_list ()
118- if r .members : # pylint: disable=no-member
118+ if r .members :
119119 # Only test assuming a member if there is a member
120- team_member_id = r .members [0 ].profile .team_member_id # pylint: disable=no-member
120+ team_member_id = r .members [0 ].profile .team_member_id
121121 dbxt .as_user (team_member_id ).files_list_folder ('' )
122122
123123
@@ -190,7 +190,7 @@ def test_account_info(self, dbx_client):
190190 @dbx_v1_client_from_env_with_test_dir
191191 def test_put_file (self , dbx_client , test_dir ):
192192 """Tests if put_file returns the expected metadata"""
193- def test_put (file , path ): # pylint: disable=redefined-builtin,useless-suppression
193+ def test_put (file , path ): # pylint: disable=redefined-builtin
194194 file_path = posixpath .join (test_dir , path )
195195 f = open (file , "rb" )
196196 metadata = dbx_client .put_file (file_path , f )
@@ -218,7 +218,7 @@ def test_put_file_overwrite(self, dbx_client, test_dir):
218218 @dbx_v1_client_from_env_with_test_dir
219219 def test_get_file (self , dbx_client , test_dir ):
220220 """Tests if storing and retrieving a file returns the same file"""
221- def test_get (file , path ): # pylint: disable=redefined-builtin,useless-suppression
221+ def test_get (file , path ): # pylint: disable=redefined-builtin
222222 file_path = posixpath .join (test_dir , path )
223223 self .upload_file (dbx_client , file , file_path )
224224 downloaded = dbx_client .get_file (file_path ).read ()
@@ -232,7 +232,7 @@ def test_get(file, path): # pylint: disable=redefined-builtin,useless-suppressi
232232 @dbx_v1_client_from_env_with_test_dir
233233 def test_get_partial_file (self , dbx_client , test_dir ):
234234 """Tests if storing a file and retrieving part of it returns the correct part"""
235- def test_get (file , path , start_frac , download_frac ): # noqa: E501; pylint: disable=redefined-builtin,useless-suppression
235+ def test_get (file , path , start_frac , download_frac ): # noqa: E501; pylint: disable=redefined-builtin
236236 file_path = posixpath .join (test_dir , path )
237237 self .upload_file (dbx_client , file , file_path )
238238 local = open (file , "rb" ).read ()
@@ -241,7 +241,7 @@ def test_get(file, path, start_frac, download_frac): # noqa: E501; pylint: disa
241241 download_start = int (start_frac * local_len ) if start_frac is not None else None
242242 download_length = int (download_frac * local_len ) if download_frac is not None else None
243243 downloaded = dbx_client .get_file (file_path , start = download_start ,
244- length = download_length ).read ()
244+ length = download_length ).read ()
245245
246246 local_file = open (file , "rb" )
247247 if download_start :
@@ -489,13 +489,20 @@ def test_chunked_upload2(self, dbx_client, test_dir):
489489 self .assertEqual (new_offset , chunk_size )
490490 self .assertIsNotNone (upload_id )
491491
492- new_offset , upload_id2 = dbx_client .upload_chunk (BytesIO (random_data2 ), 0 ,
493- new_offset , upload_id )
492+ new_offset , upload_id2 = dbx_client .upload_chunk (
493+ BytesIO (random_data2 ),
494+ 0 ,
495+ new_offset ,
496+ upload_id ,
497+ )
494498 self .assertEqual (new_offset , chunk_size * 2 )
495499 self .assertEqual (upload_id2 , upload_id )
496500
497- metadata = dbx_client .commit_chunked_upload ('/auto' + target_path , upload_id ,
498- overwrite = True )
501+ metadata = dbx_client .commit_chunked_upload (
502+ '/auto' + target_path ,
503+ upload_id ,
504+ overwrite = True ,
505+ )
499506 self .dict_has (metadata , bytes = chunk_size * 2 , path = target_path )
500507
501508 downloaded = dbx_client .get_file (target_path ).read ()
@@ -544,12 +551,14 @@ def test_delta(self, dbx_client, test_dir):
544551 cursor = None
545552 while True :
546553 r = dbx_client .delta (cursor )
547- if r ['reset' ]: entries = set ()
554+ if r ['reset' ]:
555+ entries = set ()
548556 for path_lc , md in r ['entries' ]:
549- if path_lc .startswith (prefix_lc + '/' ) or path_lc == prefix_lc :
557+ if path_lc .startswith (prefix_lc + '/' ) or path_lc == prefix_lc :
550558 assert md is not None , "we should never get deletes under 'prefix'"
551559 entries .add (path_lc )
552- if not r ['has_more' ]: break
560+ if not r ['has_more' ]:
561+ break
553562 cursor = r ['cursor' ]
554563
555564 self .assertEqual (expected , entries )
@@ -560,12 +569,14 @@ def test_delta(self, dbx_client, test_dir):
560569 cursor = None
561570 while True :
562571 r = dbx_client .delta (cursor , path_prefix = c )
563- if r ['reset' ]: entries = set ()
572+ if r ['reset' ]:
573+ entries = set ()
564574 for path_lc , md in r ['entries' ]:
565- assert path_lc .startswith (c_lc + '/' ) or path_lc == c_lc
575+ assert path_lc .startswith (c_lc + '/' ) or path_lc == c_lc
566576 assert md is not None , "we should never get deletes"
567577 entries .add (path_lc )
568- if not r ['has_more' ]: break
578+ if not r ['has_more' ]:
579+ break
569580 cursor = r ['cursor' ]
570581
571582 self .assertEqual (expected , entries )
0 commit comments