Skip to content

Commit c140cc5

Browse files
committed
Resolve ruff check warnings
1 parent 764fcda commit c140cc5

2 files changed

Lines changed: 10 additions & 19 deletions

File tree

pulp_container/app/__init__.py

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

3535
def ready(self):
3636
super().ready()
37-
from . import checks
37+
from . import checks # noqa: F401
3838

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

pulp_container/app/serializers.py

Lines changed: 9 additions & 18 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,11 +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-
)
599-
)
593+
_("The tag '{}' does not exist in the latest repository version '{}'").format(
594+
new_data["tag"], latest_version)
600595
)
601596

602597
return new_data
@@ -621,7 +616,7 @@ def validate(self, data):
621616
if content_units:
622617
if "*" in content_units and len(content_units) > 1:
623618
raise serializers.ValidationError(
624-
_("'*' should be the only item present in the {}".format(content_units))
619+
_("'*' should be the only item present in the {}").format(content_units)
625620
)
626621
return data
627622

@@ -719,10 +714,8 @@ def validate(self, data):
719714
raise serializers.ValidationError(
720715
_(
721716
"A manifest with the digest '{}' does not "
722-
"exist in the latest repository version '{}'".format(
723-
new_data["digest"], latest_version
724-
)
725-
)
717+
"exist in the latest repository version '{}'"
718+
).format(new_data["digest"], latest_version)
726719
)
727720

728721
new_data["manifest"] = manifest
@@ -762,10 +755,8 @@ def validate(self, data):
762755
raise serializers.ValidationError(
763756
_(
764757
"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-
)
758+
"produced with the specified key_id '{}'"
759+
).format(latest_version, new_data["signed_with_key_id"])
769760
)
770761

771762
new_data["sigs_pks"] = sigs_pks

0 commit comments

Comments
 (0)