Skip to content

Commit 28fbbda

Browse files
committed
Resolve ruff check warnings
1 parent ff83595 commit 28fbbda

6 files changed

Lines changed: 8 additions & 12 deletions

File tree

pulp_ansible/app/galaxy/v3/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def version_range_filter(self, queryset, name, value):
9797

9898
return queryset.filter(collection_version__version__in=version_list)
9999
except ValueError:
100-
raise ValidationError(_("%s must be a valid semantic version range." % name))
100+
raise ValidationError(_("% s must be a valid semantic version range.") % name)
101101

102102
def filter_by_repository_name(self, queryset, name, value):
103103
repository_names = self.request.query_params.getlist(name)

pulp_ansible/app/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def validate(self, data):
11141114
err.append(error.message)
11151115
if err:
11161116
raise serializers.ValidationError(
1117-
_("Provided copy criteria is invalid:'{}'".format(err))
1117+
_("Provided copy criteria is invalid:'{}'").format(err)
11181118
)
11191119

11201120
return data

pulp_ansible/app/tasks/collections.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,8 @@ async def _should_we_sync(self):
10621062

10631063
if self.last_synced_metadata_time == self.repository.last_synced_metadata_time:
10641064
noop.message = _(
1065-
"no-op: {remote} did not change since last sync - {published}".format(
1066-
remote=self.remote.url, published=self.last_synced_metadata_time
1067-
)
1068-
)
1065+
"no-op: {remote} did not change since last sync - {published}"
1066+
).format(remote=self.remote.url, published=self.last_synced_metadata_time)
10691067
return False
10701068

10711069
return True

pulp_ansible/app/tasks/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ def parse_collections_requirements_file(requirements_file_string):
136136
raise ValidationError(
137137
_(
138138
"Failed to parse the collection requirements yml: {file} "
139-
"with the following error: {error}".format(
140-
file=requirements_file_string, error=err
141-
)
142-
)
139+
"with the following error: {error}"
140+
).format(file=requirements_file_string, error=err)
143141
)
144142
else:
145143
requirements = requirements_file_string

pulp_ansible/tests/functional/api/test_export_import.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
from pulpcore.client.pulp_ansible import AnsibleRepositorySyncURL
1414

1515
from pulp_ansible.tests.functional.constants import ANSIBLE_FIXTURE_URL

pulp_ansible/tests/unit/test_serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from django.core.files.uploadedfile import SimpleUploadedFile
55
from django.test import TestCase
66

7-
from pulpcore.app.util import get_url
87
from pulpcore.plugin.models import Artifact
8+
from pulpcore.plugin.util import get_url
99

1010
from pulp_ansible.app.serializers import RoleSerializer
1111

0 commit comments

Comments
 (0)