diff --git a/codecov_cli/services/report/__init__.py b/codecov_cli/services/report/__init__.py index b19a8c19..da2b5127 100644 --- a/codecov_cli/services/report/__init__.py +++ b/codecov_cli/services/report/__init__.py @@ -3,6 +3,8 @@ import time import typing +import requests + from codecov_cli.helpers import request from codecov_cli.helpers.config import CODECOV_API_URL, CODECOV_INGEST_URL from codecov_cli.helpers.encoder import encode_slug @@ -26,7 +28,7 @@ def create_report_logic( enterprise_url: str, pull_request_number: int, fail_on_error: bool = False, - args: dict = None, + args: typing.Union[dict, None] = None, ): encoded_slug = encode_slug(slug) sending_result = send_create_report_request( @@ -71,7 +73,7 @@ def create_report_results_logic( token: typing.Optional[str], enterprise_url: str, fail_on_error: bool = False, - args: dict = None, + args: typing.Union[dict, None] = None, ): encoded_slug = encode_slug(slug) sending_result = send_reports_result_request( @@ -81,6 +83,7 @@ def create_report_results_logic( service=service, token=token, enterprise_url=enterprise_url, + args=args, ) log_warnings_and_errors_if_any( diff --git a/tests/services/report/test_report_results.py b/tests/services/report/test_report_results.py index 268f56e3..f713ce6b 100644 --- a/tests/services/report/test_report_results.py +++ b/tests/services/report/test_report_results.py @@ -43,6 +43,7 @@ def test_report_results_command_with_warnings(mocker): assert res == mock_send_reports_result_request.return_value mock_send_reports_result_request.assert_called_with( + args=None, commit_sha="commit_sha", report_code="code", service="service", @@ -85,6 +86,7 @@ def test_report_results_command_with_error(mocker): ] assert res == mock_send_reports_result_request.return_value mock_send_reports_result_request.assert_called_with( + args=None, commit_sha="commit_sha", report_code="code", service="service",