Skip to content

Commit 3593344

Browse files
committed
Resolve ruff check warnings
1 parent db0f8c6 commit 3593344

3 files changed

Lines changed: 11 additions & 19 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
@@ -574,10 +574,8 @@ def validate(self, data):
574574
raise serializers.ValidationError(
575575
_(
576576
"A manifest with the digest '{}' does not "
577-
"exist in the latest repository version '{}'".format(
578-
new_data["digest"], latest_version
579-
)
580-
)
577+
"exist in the latest repository version '{}'"
578+
).format(new_data["digest"], latest_version)
581579
)
582580

583581
new_data["manifest"] = manifest
@@ -602,10 +600,8 @@ def validate(self, data):
602600
models.Tag.objects.get(pk__in=latest_version.content.all(), name=new_data["tag"])
603601
except models.Tag.DoesNotExist:
604602
raise serializers.ValidationError(
605-
_(
606-
"The tag '{}' does not exist in the latest repository version '{}'".format(
607-
new_data["tag"], latest_version
608-
)
603+
_("The tag '{}' does not exist in the latest repository version '{}'").format(
604+
new_data["tag"], latest_version
609605
)
610606
)
611607

@@ -631,7 +627,7 @@ def validate(self, data):
631627
if content_units:
632628
if "*" in content_units and len(content_units) > 1:
633629
raise serializers.ValidationError(
634-
_("'*' should be the only item present in the {}".format(content_units))
630+
_("'*' should be the only item present in the {}").format(content_units)
635631
)
636632
return data
637633

@@ -726,10 +722,8 @@ def validate(self, data):
726722
raise serializers.ValidationError(
727723
_(
728724
"A manifest with the digest '{}' does not "
729-
"exist in the latest repository version '{}'".format(
730-
new_data["digest"], latest_version
731-
)
732-
)
725+
"exist in the latest repository version '{}'"
726+
).format(new_data["digest"], latest_version)
733727
)
734728

735729
new_data["manifest"] = manifest
@@ -769,10 +763,8 @@ def validate(self, data):
769763
raise serializers.ValidationError(
770764
_(
771765
"There are no signatures in the latest repository version '{}' "
772-
"produced with the specified key_id '{}'".format(
773-
latest_version, new_data["signed_with_key_id"]
774-
)
775-
)
766+
"produced with the specified key_id '{}'"
767+
).format(latest_version, new_data["signed_with_key_id"])
776768
)
777769

778770
new_data["sigs_pks"] = sigs_pks

pulp_container/tests/functional/api/test_pulpimportexport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import pytest
1111

12-
from pulpcore.app import settings
12+
from pulpcore.app import settings # noqa: TID251
1313

1414
from pulp_container.tests.functional.constants import REGISTRY_V2_REPO_PULP
1515

0 commit comments

Comments
 (0)