Skip to content

Commit 07d9460

Browse files
committed
Resolve ruff check warnings
1 parent 5c72009 commit 07d9460

3 files changed

Lines changed: 14 additions & 20 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: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,10 @@ def validate(self, data):
573573
except models.Manifest.DoesNotExist:
574574
raise serializers.ValidationError(
575575
_(
576-
"A manifest with the digest '{}' does not "
577-
"exist in the latest repository version '{}'".format(
578-
new_data["digest"], latest_version
579-
)
576+
"A manifest with the digest '%s' does not "
577+
"exist in the latest repository version '%s'"
580578
)
579+
% (new_data["digest"], latest_version)
581580
)
582581

583582
new_data["manifest"] = manifest
@@ -602,11 +601,8 @@ def validate(self, data):
602601
models.Tag.objects.get(pk__in=latest_version.content.all(), name=new_data["tag"])
603602
except models.Tag.DoesNotExist:
604603
raise serializers.ValidationError(
605-
_(
606-
"The tag '{}' does not exist in the latest repository version '{}'".format(
607-
new_data["tag"], latest_version
608-
)
609-
)
604+
_("The tag '%s' does not exist in the latest repository version '%s'")
605+
% (new_data["tag"], latest_version)
610606
)
611607

612608
return new_data
@@ -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

@@ -725,11 +721,10 @@ def validate(self, data):
725721
except models.Manifest.DoesNotExist:
726722
raise serializers.ValidationError(
727723
_(
728-
"A manifest with the digest '{}' does not "
729-
"exist in the latest repository version '{}'".format(
730-
new_data["digest"], latest_version
731-
)
724+
"A manifest with the digest '%s' does not "
725+
"exist in the latest repository version '%s'"
732726
)
727+
% (new_data["digest"], latest_version)
733728
)
734729

735730
new_data["manifest"] = manifest
@@ -768,11 +763,10 @@ def validate(self, data):
768763
if not sigs_pks:
769764
raise serializers.ValidationError(
770765
_(
771-
"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-
)
766+
"There are no signatures in the latest repository version '%s' "
767+
"produced with the specified key_id '%s'"
775768
)
769+
% (latest_version, new_data["signed_with_key_id"])
776770
)
777771

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