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

Commit 2e71531

Browse files
committed
More syntax and lint fixes
1 parent 2dfa87b commit 2e71531

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

graphql_api/tests/test_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import json
2-
from unittest.mock import Mock, call, patch
2+
from unittest.mock import Mock, patch
33

44
from ariadne import ObjectType, make_executable_schema
55
from ariadne.validation import cost_directive

upload/helpers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,6 @@ def generate_upload_prometheus_metrics_tags(
818818
"upload_version": upload_version,
819819
}
820820

821-
for field, value in optional_fields.items():
822-
if value or fill_labels:
823-
metrics_tags[field] = value
821+
metrics_tags.update({field: value for field, value in optional_fields.items() if value or fill_labels})
824822

825823
return metrics_tags

upload/views/commits.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from rest_framework.exceptions import NotAuthenticated
44
from rest_framework.generics import ListCreateAPIView
5-
from shared.metrics import Counter
65

76
from codecov_auth.authentication.repo_auth import (
87
GitHubOIDCTokenAuthentication,

upload/views/legacy.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from rest_framework.exceptions import ValidationError
1717
from rest_framework.permissions import AllowAny
1818
from rest_framework.views import APIView
19-
from shared.metrics import metrics, Counter
19+
from shared.metrics import metrics
2020

2121
from codecov.db import sync_to_async
2222
from codecov_auth.commands.owner import OwnerCommands
@@ -45,12 +45,6 @@
4545

4646
log = logging.getLogger(__name__)
4747

48-
API_UPLOAD_COUNTER = Counter(
49-
"api_upload",
50-
"Number of times API upload endpoint request starts",
51-
["version"],
52-
)
53-
5448

5549
class PlainTextRenderer(renderers.BaseRenderer):
5650
media_type = "text/plain"

0 commit comments

Comments
 (0)