@@ -588,10 +588,8 @@ def validate(self, data):
588588 raise serializers .ValidationError (
589589 _ (
590590 "A manifest with the digest '{}' does not "
591- "exist in the latest repository version '{}'" .format (
592- new_data ["digest" ], latest_version
593- )
594- )
591+ "exist in the latest repository version '{}'"
592+ ).format (new_data ["digest" ], latest_version )
595593 )
596594
597595 new_data ["manifest" ] = manifest
@@ -616,10 +614,8 @@ def validate(self, data):
616614 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
617615 except models .Tag .DoesNotExist :
618616 raise serializers .ValidationError (
619- _ (
620- "The tag '{}' does not exist in the latest repository version '{}'" .format (
621- new_data ["tag" ], latest_version
622- )
617+ _ ("The tag '{}' does not exist in the latest repository version '{}'" ).format (
618+ new_data ["tag" ], latest_version
623619 )
624620 )
625621
@@ -645,7 +641,7 @@ def validate(self, data):
645641 if content_units :
646642 if "*" in content_units and len (content_units ) > 1 :
647643 raise serializers .ValidationError (
648- _ ("'*' should be the only item present in the {}" .format (content_units ) )
644+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
649645 )
650646 return data
651647
@@ -740,10 +736,8 @@ def validate(self, data):
740736 raise serializers .ValidationError (
741737 _ (
742738 "A manifest with the digest '{}' does not "
743- "exist in the latest repository version '{}'" .format (
744- new_data ["digest" ], latest_version
745- )
746- )
739+ "exist in the latest repository version '{}'"
740+ ).format (new_data ["digest" ], latest_version )
747741 )
748742
749743 new_data ["manifest" ] = manifest
@@ -783,10 +777,8 @@ def validate(self, data):
783777 raise serializers .ValidationError (
784778 _ (
785779 "There are no signatures in the latest repository version '{}' "
786- "produced with the specified key_id '{}'" .format (
787- latest_version , new_data ["signed_with_key_id" ]
788- )
789- )
780+ "produced with the specified key_id '{}'"
781+ ).format (latest_version , new_data ["signed_with_key_id" ])
790782 )
791783
792784 new_data ["sigs_pks" ] = sigs_pks
0 commit comments