@@ -564,10 +564,8 @@ def validate(self, data):
564564 raise serializers .ValidationError (
565565 _ (
566566 "A manifest with the digest '{}' does not "
567- "exist in the latest repository version '{}'" .format (
568- new_data ["digest" ], latest_version
569- )
570- )
567+ "exist in the latest repository version '{}'"
568+ ).format (new_data ["digest" ], latest_version )
571569 )
572570
573571 new_data ["manifest" ] = manifest
@@ -592,10 +590,8 @@ def validate(self, data):
592590 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
593591 except models .Tag .DoesNotExist :
594592 raise serializers .ValidationError (
595- _ (
596- "The tag '{}' does not exist in the latest repository version '{}'" .format (
597- new_data ["tag" ], latest_version
598- )
593+ _ ("The tag '{}' does not exist in the latest repository version '{}'" ).format (
594+ new_data ["tag" ], latest_version
599595 )
600596 )
601597
@@ -621,7 +617,7 @@ def validate(self, data):
621617 if content_units :
622618 if "*" in content_units and len (content_units ) > 1 :
623619 raise serializers .ValidationError (
624- _ ("'*' should be the only item present in the {}" .format (content_units ) )
620+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
625621 )
626622 return data
627623
@@ -716,10 +712,8 @@ def validate(self, data):
716712 raise serializers .ValidationError (
717713 _ (
718714 "A manifest with the digest '{}' does not "
719- "exist in the latest repository version '{}'" .format (
720- new_data ["digest" ], latest_version
721- )
722- )
715+ "exist in the latest repository version '{}'"
716+ ).format (new_data ["digest" ], latest_version )
723717 )
724718
725719 new_data ["manifest" ] = manifest
@@ -759,10 +753,8 @@ def validate(self, data):
759753 raise serializers .ValidationError (
760754 _ (
761755 "There are no signatures in the latest repository version '{}' "
762- "produced with the specified key_id '{}'" .format (
763- latest_version , new_data ["signed_with_key_id" ]
764- )
765- )
756+ "produced with the specified key_id '{}'"
757+ ).format (latest_version , new_data ["signed_with_key_id" ])
766758 )
767759
768760 new_data ["sigs_pks" ] = sigs_pks
0 commit comments