@@ -574,10 +574,8 @@ def validate(self, data):
574574 raise serializers .ValidationError (
575575 _ (
576576 "A manifest with the digest '{}' does not "
577- "exist in the latest repository version '{}'" .format (
578- new_data ["digest" ], latest_version
579- )
580- )
577+ "exist in the latest repository version '{}'"
578+ ).format (new_data ["digest" ], latest_version )
581579 )
582580
583581 new_data ["manifest" ] = manifest
@@ -602,10 +600,8 @@ def validate(self, data):
602600 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
603601 except models .Tag .DoesNotExist :
604602 raise serializers .ValidationError (
605- _ (
606- "The tag '{}' does not exist in the latest repository version '{}'" .format (
607- new_data ["tag" ], latest_version
608- )
603+ _ ("The tag '{}' does not exist in the latest repository version '{}'" ).format (
604+ new_data ["tag" ], latest_version
609605 )
610606 )
611607
@@ -631,7 +627,7 @@ def validate(self, data):
631627 if content_units :
632628 if "*" in content_units and len (content_units ) > 1 :
633629 raise serializers .ValidationError (
634- _ ("'*' should be the only item present in the {}" .format (content_units ) )
630+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
635631 )
636632 return data
637633
@@ -726,10 +722,8 @@ def validate(self, data):
726722 raise serializers .ValidationError (
727723 _ (
728724 "A manifest with the digest '{}' does not "
729- "exist in the latest repository version '{}'" .format (
730- new_data ["digest" ], latest_version
731- )
732- )
725+ "exist in the latest repository version '{}'"
726+ ).format (new_data ["digest" ], latest_version )
733727 )
734728
735729 new_data ["manifest" ] = manifest
@@ -769,10 +763,8 @@ def validate(self, data):
769763 raise serializers .ValidationError (
770764 _ (
771765 "There are no signatures in the latest repository version '{}' "
772- "produced with the specified key_id '{}'" .format (
773- latest_version , new_data ["signed_with_key_id" ]
774- )
775- )
766+ "produced with the specified key_id '{}'"
767+ ).format (latest_version , new_data ["signed_with_key_id" ])
776768 )
777769
778770 new_data ["sigs_pks" ] = sigs_pks
0 commit comments