@@ -580,7 +580,7 @@ def interpret_b2_error(
580580 matcher = COPY_SOURCE_TOO_BIG_ERROR_MESSAGE_RE .match (message )
581581 assert matcher is not None , f"unexpected error message: { message } "
582582 size = int (matcher .group ('size' ))
583- return CopySourceTooBig (( message , code , size )
583+ return CopySourceTooBig (message , code , size )
584584 elif status == 400 and code == 'file_lock_conflict' :
585585 return DisablingFileLockNotSupported ()
586586 elif status == 400 and code == 'source_replication_conflict' :
@@ -597,13 +597,15 @@ def interpret_b2_error(
597597 if message == 'Turning on file lock for an existing bucket having source replication configuration is not allowed.' :
598598 return SourceReplicationConflict ()
599599
600- # it's "bad_request" on 2022-09-14, but will become 'disabling_file_lock_not_allowed ' # TODO: cleanup after 2022-09-22
600+ # it's "bad_request" on 2022-09-14, but will become 'restricted_bucket_conflict ' # TODO: cleanup after 2022-09-22
601601 if message == 'Turning on file lock for a restricted bucket is not allowed.' :
602602 return EnablingFileLockOnRestrictedBucket ()
603603
604604 return BadRequest (message , code )
605605 elif status == 400 :
606- warnings .warn (f"bad request exception with an unknown `code`. message={ message } , code={ code } " )
606+ warnings .warn (
607+ f"bad request exception with an unknown `code`. message={ message } , code={ code } "
608+ )
607609 return BadRequest (message , code )
608610 elif status == 401 and code in ("bad_auth_token" , "expired_auth_token" ):
609611 return InvalidAuthToken (message , code )
0 commit comments