From c6ddc3231756e9a451e4472ab33a315f04135ddb Mon Sep 17 00:00:00 2001 From: Pradeep Tammali Date: Tue, 30 Apr 2024 12:12:39 +0200 Subject: [PATCH] test: testing branch --- codecov/badge.py | 3 +++ codecov/coverage.py | 4 +++- codecov/diff_grouper.py | 3 +++ codecov/github.py | 2 +- codecov/github_client.py | 3 +++ codecov/groups.py | 3 +++ codecov/log.py | 3 +++ codecov/main.py | 3 +++ codecov/settings.py | 3 +++ codecov/template.py | 2 +- 10 files changed, 26 insertions(+), 3 deletions(-) diff --git a/codecov/badge.py b/codecov/badge.py index abc515f..628b0d0 100644 --- a/codecov/badge.py +++ b/codecov/badge.py @@ -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, diff --git a/codecov/coverage.py b/codecov/coverage.py index e6c3cda..089f79e 100644 --- a/codecov/coverage.py +++ b/codecov/coverage.py @@ -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 diff --git a/codecov/diff_grouper.py b/codecov/diff_grouper.py index a3f92f9..181058c 100644 --- a/codecov/diff_grouper.py +++ b/codecov/diff_grouper.py @@ -38,6 +38,9 @@ def get_missing_groups( ) +# sdfs + + def get_diff_missing_groups( coverage: coverage_module.Coverage, diff_coverage: coverage_module.DiffCoverage, diff --git a/codecov/github.py b/codecov/github.py index 4da120c..e1258f1 100644 --- a/codecov/github.py +++ b/codecov/github.py @@ -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: diff --git a/codecov/github_client.py b/codecov/github_client.py index d6ce5ae..f48af44 100644 --- a/codecov/github_client.py +++ b/codecov/github_client.py @@ -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 diff --git a/codecov/groups.py b/codecov/groups.py index 4c87916..89b7a51 100644 --- a/codecov/groups.py +++ b/codecov/groups.py @@ -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 diff --git a/codecov/log.py b/codecov/log.py index c59b9f0..c49d77b 100644 --- a/codecov/log.py +++ b/codecov/log.py @@ -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', diff --git a/codecov/main.py b/codecov/main.py index 19228d3..f4cd009 100644 --- a/codecov/main.py +++ b/codecov/main.py @@ -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, diff --git a/codecov/settings.py b/codecov/settings.py index 17f029b..db24ab6 100644 --- a/codecov/settings.py +++ b/codecov/settings.py @@ -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""" diff --git a/codecov/template.py b/codecov/template.py index 6a635e4..749d2a6 100644 --- a/codecov/template.py +++ b/codecov/template.py @@ -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(