Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions codecov/badge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
This module should contain only the things relevant to the badge being computed
by shields.io
"""

from __future__ import annotations

import decimal
import urllib.parse

# skdjfh


def get_badge_color(
rate: decimal.Decimal,
Expand Down
4 changes: 3 additions & 1 deletion codecov/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@

from codecov import log


# sdfs
# The dataclasses in this module are accessible in the template, which is overridable by the user.
# As a coutesy, we should do our best to keep the existing fields for backward compatibility,
# and if we really can't and can't add properties, at least bump the major version.


@dataclasses.dataclass
class CoverageMetadata:
version: str
Expand Down
3 changes: 3 additions & 0 deletions codecov/diff_grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def get_missing_groups(
)


# sdfs


def get_diff_missing_groups(
coverage: coverage_module.Coverage,
diff_coverage: coverage_module.DiffCoverage,
Expand Down
2 changes: 1 addition & 1 deletion codecov/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_pr_number(github: github_client.GitHub, config: settings.Config) -> int:
raise CannotGetPullRequest from exc
except github_client.NotFound:
log.warning(f'Pull request #{config.GITHUB_PR_NUMBER} does not exist')

# sdfs
# If we're not on a PR, we need to find the PR number from the branch name
if config.GITHUB_REF:
try:
Expand Down
3 changes: 3 additions & 0 deletions codecov/github_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def __call__(self, **kw):
return self._gh._http(self._method, self._path, **kw)


# sdfs


class _Callable:
def __init__(self, _gh, _name):
self._gh = _gh
Expand Down
3 changes: 3 additions & 0 deletions codecov/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ def reducer(acc: list[tuple[int, int]], group: tuple[int, int]) -> list[tuple[in
return acc

return functools.reduce(reducer, contiguous_groups, [])


# sdfs
3 changes: 3 additions & 0 deletions codecov/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ def __getattr__(name):
return getattr(logger, name)


# sdfs


def setup(debug: bool = False):
logging.basicConfig(
level='DEBUG' if debug else 'INFO',
Expand Down
3 changes: 3 additions & 0 deletions codecov/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def action(config: settings.Config, github_session: httpx.Client) -> int:
)


# sdfs


def process_pr( # pylint: disable=too-many-locals
config: settings.Config,
gh: github_client.GitHub,
Expand Down
3 changes: 3 additions & 0 deletions codecov/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def str_to_bool(value: str) -> bool:
return value.lower() in ('1', 'true', 'yes')


# sdfs
# pylint: disable=invalid-name, too-many-instance-attributes


@dataclasses.dataclass
class Config:
"""This object defines the environment variables"""
Expand Down
2 changes: 1 addition & 1 deletion codecov/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_comment_markdown( # pylint: disable=too-many-arguments,too-many-locals
minimum_green=minimum_green,
minimum_orange=minimum_orange,
)

# sdf
missing_diff_lines = {
key: list(value)
for key, value in itertools.groupby(
Expand Down