Skip to content

Commit 31e62f7

Browse files
dralleypulpbot
authored andcommitted
Resolve ruff check warnings
1 parent b0981d4 commit 31e62f7

1 file changed

Lines changed: 9 additions & 17 deletions

File tree

pulp_container/app/serializers.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,8 @@ def validate(self, data):
513513
raise serializers.ValidationError(
514514
_(
515515
"A manifest with the digest '{}' does not "
516-
"exist in the latest repository version '{}'".format(
517-
new_data["digest"], latest_version
518-
)
519-
)
516+
"exist in the latest repository version '{}'"
517+
).format(new_data["digest"], latest_version)
520518
)
521519

522520
new_data["manifest"] = manifest
@@ -541,10 +539,8 @@ def validate(self, data):
541539
models.Tag.objects.get(pk__in=latest_version.content.all(), name=new_data["tag"])
542540
except models.Tag.DoesNotExist:
543541
raise serializers.ValidationError(
544-
_(
545-
"The tag '{}' does not exist in the latest repository version '{}'".format(
546-
new_data["tag"], latest_version
547-
)
542+
_("The tag '{}' does not exist in the latest repository version '{}'").format(
543+
new_data["tag"], latest_version
548544
)
549545
)
550546

@@ -570,7 +566,7 @@ def validate(self, data):
570566
if content_units:
571567
if "*" in content_units and len(content_units) > 1:
572568
raise serializers.ValidationError(
573-
_("'*' should be the only item present in the {}".format(content_units))
569+
_("'*' should be the only item present in the {}").format(content_units)
574570
)
575571
return data
576572

@@ -665,10 +661,8 @@ def validate(self, data):
665661
raise serializers.ValidationError(
666662
_(
667663
"A manifest with the digest '{}' does not "
668-
"exist in the latest repository version '{}'".format(
669-
new_data["digest"], latest_version
670-
)
671-
)
664+
"exist in the latest repository version '{}'"
665+
).format(new_data["digest"], latest_version)
672666
)
673667

674668
new_data["manifest"] = manifest
@@ -708,10 +702,8 @@ def validate(self, data):
708702
raise serializers.ValidationError(
709703
_(
710704
"There are no signatures in the latest repository version '{}' "
711-
"produced with the specified key_id '{}'".format(
712-
latest_version, new_data["signed_with_key_id"]
713-
)
714-
)
705+
"produced with the specified key_id '{}'"
706+
).format(latest_version, new_data["signed_with_key_id"])
715707
)
716708

717709
new_data["sigs_pks"] = sigs_pks

0 commit comments

Comments
 (0)