@@ -44,7 +44,7 @@ async def handle_ls(args):
4444 print (formatter .format (* row ))
4545
4646
47- async def handle_download (args ):
47+ async def handle_download (args ): # pylint: disable=too-many-branches
4848 target = Path (args .dest or os .getcwd ())
4949
5050 try :
@@ -59,11 +59,11 @@ async def download(invitation, resource, objects=None, archive=False, destinatio
5959 async with AsyncInvitation .from_uri (args .endpoint ) as invitation :
6060 jobs = []
6161
62- if not invitation .details .is_dir :
62+ if not invitation .details .is_dir : # pylint: disable=too-many-nested-blocks
6363 if args .src :
6464 print (f"error: object not found error: '{ args .src } '" , file = sys .stderr )
6565 sys .exit (1 )
66- resource = await anext ( invitation .files .listdir ()) # noqa: F821
66+ resource = await invitation .files .listdir (). __anext__ ()
6767 jobs .append (download (invitation , resource , destination = target ))
6868 else :
6969 try :
@@ -90,9 +90,9 @@ async def download(invitation, resource, objects=None, archive=False, destinatio
9090 except PermissionError :
9191 print (f"error: permission denied: Cannot create files and folders at '{ target } '." , file = sys .stderr )
9292 except NotADirectoryError :
93- print (f"error: path conflict: '{ target } ' is a file, but a folder was expected." , file = sys .strerr )
93+ print (f"error: path conflict: '{ target } ' is a file, but a folder was expected." , file = sys .stderr )
9494 except OSError as e :
95- print (f"error: an unexpected error occurred during download. { e } " , file = sys .strerr )
95+ print (f"error: an unexpected error occurred during download. { e } " , file = sys .stderr )
9696
9797
9898async def handle_upload (args ):
0 commit comments