Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-codecov committed Nov 12, 2024
1 parent 6becd24 commit 2100332
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions upload/views/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
log = logging.getLogger(__name__)


def create_upload(serializer, repository, commit, report, is_shelter_request, analytics_token):
def create_upload(
serializer, repository, commit, report, is_shelter_request, analytics_token
):
version = (
serializer.validated_data["version"]
if "version" in serializer.validated_data
Expand Down Expand Up @@ -126,7 +128,9 @@ def activate_repo(repository):
)


def send_analytics_data(commit: Commit, upload: ReportSession, version, analytics_token):
def send_analytics_data(
commit: Commit, upload: ReportSession, version, analytics_token
):
analytics_upload_data = {
"commit": commit.commitid,
"branch": commit.branch,
Expand Down Expand Up @@ -156,7 +160,9 @@ def get_token_for_analytics(commit: Commit, request):
if isinstance(request.auth, TokenlessAuth):
analytics_token = "tokenless_upload"
elif isinstance(request.auth, OrgLevelTokenRepositoryAuth):
analytics_token = OrganizationLevelToken.objects.filter(owner=repo.author).first().token
analytics_token = (

Check warning on line 163 in upload/views/uploads.py

View check run for this annotation

Codecov Notifications / codecov/patch

upload/views/uploads.py#L163

Added line #L163 was not covered by tests
OrganizationLevelToken.objects.filter(owner=repo.author).first().token
)
elif isinstance(request.auth, OIDCTokenRepositoryAuth):
analytics_token = "oidc_token_upload"
else:
Expand Down

0 comments on commit 2100332

Please sign in to comment.