Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 2dfa87b

Browse files
committed
fix: Lints
1 parent 79d6d52 commit 2dfa87b

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

graphql_api/tests/test_views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ async def test_when_rate_limit_reached(
218218
== "It looks like you've hit the rate limit of 1000 req/min. Try again later."
219219
)
220220

221-
mocked_error_counter.assert_called_with(error_type="rate_limit", path="/graphql/gh")
221+
mocked_error_counter.assert_called_with(
222+
error_type="rate_limit", path="/graphql/gh"
223+
)
222224
mocked_request_counter.assert_called_with(path="/graphql/gh")
223225

224226
@override_settings(

graphql_api/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ async def post(self, request, *args, **kwargs):
266266
request_body=req_body,
267267
),
268268
)
269-
GQL_ERROR_TYPE_COUNTER.labels(error_type="query_cost_exceeded", path=req_path).inc()
269+
GQL_ERROR_TYPE_COUNTER.labels(
270+
error_type="query_cost_exceeded", path=req_path
271+
).inc()
270272
return HttpResponseBadRequest(
271273
JsonResponse("Your query is too costly.")
272274
)

upload/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,15 +807,15 @@ def generate_upload_prometheus_metrics_tags(
807807
endpoint=endpoint,
808808
is_using_shelter="yes" if is_shelter_request else "no",
809809
)
810-
810+
811811
repo_visibility = None
812812
if repository:
813813
repo_visibility = "private" if repository.private else "public"
814814

815815
optional_fields = {
816816
"repo_visibility": repo_visibility,
817817
"position": position,
818-
"upload_version": upload_version
818+
"upload_version": upload_version,
819819
}
820820

821821
for field, value in optional_fields.items():

upload/views/commits.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
log = logging.getLogger(__name__)
2424

25+
2526
class CommitViews(ListCreateAPIView, GetterMixin):
2627
serializer_class = CommitSerializer
2728
permission_classes = [CanDoCoverageUploadsPermission]

upload/views/empty_upload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def post(self, request, *args, **kwargs):
150150
]
151151
API_UPLOAD_COUNTER.labels(
152152
**generate_upload_prometheus_metrics_tags(
153-
tags=generate_upload_prometheus_metrics_tags(
154153
action="coverage",
155154
endpoint="empty_upload",
156155
request=self.request,

upload/views/legacy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
["version"],
5252
)
5353

54+
5455
class PlainTextRenderer(renderers.BaseRenderer):
5556
media_type = "text/plain"
5657
format = "txt"

0 commit comments

Comments
 (0)