Skip to content

Commit 3957cde

Browse files
committed
Resolve ruff check warnings
1 parent 3820735 commit 3957cde

2 files changed

Lines changed: 10 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: 9 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,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

@@ -716,10 +712,8 @@ def validate(self, data):
716712
raise serializers.ValidationError(
717713
_(
718714
"A manifest with the digest '{}' does not "
719-
"exist in the latest repository version '{}'".format(
720-
new_data["digest"], latest_version
721-
)
722-
)
715+
"exist in the latest repository version '{}'"
716+
).format(new_data["digest"], latest_version)
723717
)
724718

725719
new_data["manifest"] = manifest
@@ -759,10 +753,8 @@ def validate(self, data):
759753
raise serializers.ValidationError(
760754
_(
761755
"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-
)
756+
"produced with the specified key_id '{}'"
757+
).format(latest_version, new_data["signed_with_key_id"])
766758
)
767759

768760
new_data["sigs_pks"] = sigs_pks

0 commit comments

Comments
 (0)