Skip to content

Commit 1fd7c46

Browse files
committed
Fix translation errors
1 parent 8f77ce2 commit 1fd7c46

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

pulp_container/app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ def update_sequences(sender, **kwargs):
3535

3636
def ready(self):
3737
super().ready()
38-
from . import checks
38+
from . import checks # noqa:F401
3939

4040
post_migrate.connect(PulpContainerPluginAppConfig.update_sequences, sender=self)

pulp_container/app/serializers.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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,8 +617,9 @@ 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
)
622+
626623
return data
627624

628625

@@ -716,10 +713,8 @@ def validate(self, data):
716713
raise serializers.ValidationError(
717714
_(
718715
"A manifest with the digest '{}' does not "
719-
"exist in the latest repository version '{}'".format(
720-
new_data["digest"], latest_version
721-
)
722-
)
716+
"exist in the latest repository version '{}'"
717+
).format(new_data["digest"], latest_version)
723718
)
724719

725720
new_data["manifest"] = manifest
@@ -759,10 +754,8 @@ def validate(self, data):
759754
raise serializers.ValidationError(
760755
_(
761756
"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-
)
757+
"produced with the specified key_id '{}'"
758+
).format(latest_version, new_data["signed_with_key_id"])
766759
)
767760

768761
new_data["sigs_pks"] = sigs_pks

0 commit comments

Comments
 (0)