Skip to content

Commit b9e7029

Browse files
committed
Resolve ruff check warnings
1 parent d0b5e92 commit b9e7029

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
@@ -588,10 +588,8 @@ def validate(self, data):
588588
raise serializers.ValidationError(
589589
_(
590590
"A manifest with the digest '{}' does not "
591-
"exist in the latest repository version '{}'".format(
592-
new_data["digest"], latest_version
593-
)
594-
)
591+
"exist in the latest repository version '{}'"
592+
).format(new_data["digest"], latest_version)
595593
)
596594

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

@@ -645,7 +641,7 @@ def validate(self, data):
645641
if content_units:
646642
if "*" in content_units and len(content_units) > 1:
647643
raise serializers.ValidationError(
648-
_("'*' should be the only item present in the {}".format(content_units))
644+
_("'*' should be the only item present in the {}").format(content_units)
649645
)
650646
return data
651647

@@ -740,10 +736,8 @@ def validate(self, data):
740736
raise serializers.ValidationError(
741737
_(
742738
"A manifest with the digest '{}' does not "
743-
"exist in the latest repository version '{}'".format(
744-
new_data["digest"], latest_version
745-
)
746-
)
739+
"exist in the latest repository version '{}'"
740+
).format(new_data["digest"], latest_version)
747741
)
748742

749743
new_data["manifest"] = manifest
@@ -783,10 +777,8 @@ def validate(self, data):
783777
raise serializers.ValidationError(
784778
_(
785779
"There are no signatures in the latest repository version '{}' "
786-
"produced with the specified key_id '{}'".format(
787-
latest_version, new_data["signed_with_key_id"]
788-
)
789-
)
780+
"produced with the specified key_id '{}'"
781+
).format(latest_version, new_data["signed_with_key_id"])
790782
)
791783

792784
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)