Skip to content

Commit 9acd1ec

Browse files
committed
Resolve ruff check warnings
1 parent 056abee commit 9acd1ec

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
@@ -36,6 +36,6 @@ def update_sequences(sender, **kwargs):
3636

3737
def ready(self):
3838
super().ready()
39-
from . import checks
39+
from . import checks # noqa: F401
4040

4141
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
@@ -590,10 +590,8 @@ def validate(self, data):
590590
raise serializers.ValidationError(
591591
_(
592592
"A manifest with the digest '{}' does not "
593-
"exist in the latest repository version '{}'".format(
594-
new_data["digest"], latest_version
595-
)
596-
)
593+
"exist in the latest repository version '{}'"
594+
).format(new_data["digest"], latest_version)
597595
)
598596

599597
new_data["manifest"] = manifest
@@ -618,10 +616,8 @@ def validate(self, data):
618616
models.Tag.objects.get(pk__in=latest_version.content.all(), name=new_data["tag"])
619617
except models.Tag.DoesNotExist:
620618
raise serializers.ValidationError(
621-
_(
622-
"The tag '{}' does not exist in the latest repository version '{}'".format(
623-
new_data["tag"], latest_version
624-
)
619+
_("The tag '{}' does not exist in the latest repository version '{}'").format(
620+
new_data["tag"], latest_version
625621
)
626622
)
627623

@@ -647,7 +643,7 @@ def validate(self, data):
647643
if content_units:
648644
if "*" in content_units and len(content_units) > 1:
649645
raise serializers.ValidationError(
650-
_("'*' should be the only item present in the {}".format(content_units))
646+
_("'*' should be the only item present in the {}").format(content_units)
651647
)
652648
return data
653649

@@ -742,10 +738,8 @@ def validate(self, data):
742738
raise serializers.ValidationError(
743739
_(
744740
"A manifest with the digest '{}' does not "
745-
"exist in the latest repository version '{}'".format(
746-
new_data["digest"], latest_version
747-
)
748-
)
741+
"exist in the latest repository version '{}'"
742+
).format(new_data["digest"], latest_version)
749743
)
750744

751745
new_data["manifest"] = manifest
@@ -785,10 +779,8 @@ def validate(self, data):
785779
raise serializers.ValidationError(
786780
_(
787781
"There are no signatures in the latest repository version '{}' "
788-
"produced with the specified key_id '{}'".format(
789-
latest_version, new_data["signed_with_key_id"]
790-
)
791-
)
782+
"produced with the specified key_id '{}'"
783+
).format(latest_version, new_data["signed_with_key_id"])
792784
)
793785

794786
new_data["sigs_pks"] = sigs_pks

0 commit comments

Comments
 (0)