@@ -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
@@ -719,10 +715,8 @@ def validate(self, data):
719715 raise serializers .ValidationError (
720716 _ (
721717 "A manifest with the digest '{}' does not "
722- "exist in the latest repository version '{}'" .format (
723- new_data ["digest" ], latest_version
724- )
725- )
718+ "exist in the latest repository version '{}'"
719+ ).format (new_data ["digest" ], latest_version )
726720 )
727721
728722 new_data ["manifest" ] = manifest
@@ -762,10 +756,8 @@ def validate(self, data):
762756 raise serializers .ValidationError (
763757 _ (
764758 "There are no signatures in the latest repository version '{}' "
765- "produced with the specified key_id '{}'" .format (
766- latest_version , new_data ["signed_with_key_id" ]
767- )
768- )
759+ "produced with the specified key_id '{}'"
760+ ).format (latest_version , new_data ["signed_with_key_id" ])
769761 )
770762
771763 new_data ["sigs_pks" ] = sigs_pks
0 commit comments