diff --git a/README.md b/README.md index 8be9fc3d2..7aea238b4 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Codecov-cli supports user input. These inputs, along with their descriptions and | `create-report-results` | Used for local upload. It tells codecov that you finished local uploading and want it to calculate the results for you to get them locally. | `get-report-results` | Used for local upload. It asks codecov to provide you the report results you calculated with the previous command. | `pr-base-picking` | Tells codecov that you want to explicitly define a base for your PR -| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previosly mentioned commands. +| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previously mentioned commands. | `send-notifications` | A command that tells Codecov that you finished uploading and you want to be sent notifications. To disable automatically sent notifications please consider adding manual_trigger to your codecov.yml, so it will look like codecov: notify: manual_trigger: true. >**Note**: Every command has its own different options that will be mentioned later in this doc. Codecov will try to load these options from your CI environment variables, if not, it will try to load them from git, if not found, you may need to add them manually. diff --git a/codecov_cli/commands/labelanalysis.py b/codecov_cli/commands/labelanalysis.py index 6b72ac829..8f720e287 100644 --- a/codecov_cli/commands/labelanalysis.py +++ b/codecov_cli/commands/labelanalysis.py @@ -259,7 +259,7 @@ def _parse_runner_params(runner_params: List[str]) -> Dict[str, str]: # a good reason for the param to include '=' in the value. if param.count("=") == 0: logger.warning( - f"Runner param {param} is not well formated. Setting value to None. Use '--runner-param key=value' to set value" + f"Runner param {param} is not well formatted. Setting value to None. Use '--runner-param key=value' to set value" ) final_params[param] = None else: diff --git a/codecov_cli/plugins/pycoverage.py b/codecov_cli/plugins/pycoverage.py index be8318335..97fcccb44 100644 --- a/codecov_cli/plugins/pycoverage.py +++ b/codecov_cli/plugins/pycoverage.py @@ -28,7 +28,7 @@ def project_root(self) -> typing.Optional[pathlib.Path]: def report_type(self) -> str: """ Report type to generate. - Overrided if include_contexts == True + Overridden if include_contexts == True report_type: str [values xml|json; default xml] """ return self.get("report_type", "xml") diff --git a/codecov_cli/runners/pytest_standard_runner.py b/codecov_cli/runners/pytest_standard_runner.py index 3d1f9a2a8..0e4260dde 100644 --- a/codecov_cli/runners/pytest_standard_runner.py +++ b/codecov_cli/runners/pytest_standard_runner.py @@ -76,7 +76,7 @@ def _possibly_warn_bad_config(self, config_params: dict): provided_config_params = config_params.keys() for provided_param in provided_config_params: if provided_param not in available_config_params: - logger.warning(f"Config parameter '{provided_param}' is unknonw.") + logger.warning(f"Config parameter '{provided_param}' is unknown.") def parse_captured_output_error(self, exp: CalledProcessError) -> str: result = "" diff --git a/codecov_cli/services/report/__init__.py b/codecov_cli/services/report/__init__.py index da2b51273..757a7f477 100644 --- a/codecov_cli/services/report/__init__.py +++ b/codecov_cli/services/report/__init__.py @@ -138,7 +138,7 @@ def send_reports_result_get_request( state = response_content.get("state").lower() if state == "error": logger.error( - "An error occured while processing the report. Please try again later.", + "An error occurred while processing the report. Please try again later.", extra=dict( extra_log_attributes=dict( response_status_code=response_obj.status_code, diff --git a/codecov_cli/services/staticanalysis/__init__.py b/codecov_cli/services/staticanalysis/__init__.py index 3cde43130..16cd15fd7 100644 --- a/codecov_cli/services/staticanalysis/__init__.py +++ b/codecov_cli/services/staticanalysis/__init__.py @@ -39,7 +39,7 @@ async def run_analysis_entrypoint( files = list(ff.find_files(folder, pattern, folders_to_exclude)) processing_results = await process_files(files, numberprocesses, config) # Let users know if there were processing errors - # This is here and not in the funcition so we can add an option to ignore those (possibly) + # This is here and not in the function so we can add an option to ignore those (possibly) # Also makes the function easier to test processing_errors = processing_results["processing_errors"] log_processing_errors(processing_errors) diff --git a/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py b/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py index f313bfb79..681eeb1ad 100644 --- a/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py +++ b/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py @@ -16,7 +16,7 @@ def visit(self, node: Node): self.visit(c) def _is_function_docstring(self, node: Node): - """Skips docstrings for funtions, such as this one. + """Skips docstrings for functions, such as this one. Pytest doesn't include them in the report, so I don't think we should either, at least for now. """ diff --git a/tests/helpers/test_folder_searcher.py b/tests/helpers/test_folder_searcher.py index 59eeef9dc..9e66908f5 100644 --- a/tests/helpers/test_folder_searcher.py +++ b/tests/helpers/test_folder_searcher.py @@ -256,7 +256,7 @@ def test_search_directories(tmp_path): filename_include_regex = globs_to_regex(["*.app"]) filepaths = [ "banana.app/path/of/directory.txt", - "path/to/apple.app/path/of/directorys", + "path/to/apple.app/path/of/directories", "path/to/banana.app/folder/test.txt", "apple.py", "banana.py", diff --git a/tests/runners/test_pytest_standard_runner.py b/tests/runners/test_pytest_standard_runner.py index 489a0e0c9..b13216cb9 100644 --- a/tests/runners/test_pytest_standard_runner.py +++ b/tests/runners/test_pytest_standard_runner.py @@ -56,7 +56,7 @@ def test_warning_bad_config(self, mock_warning): runner = PytestStandardRunner(params) # Adding invalid config options emits a warning mock_warning.assert_called_with( - "Config parameter 'some_missing_option' is unknonw." + "Config parameter 'some_missing_option' is unknown." ) # Warnings don't change the config assert runner.params == {**params, "some_missing_option": "option"} @@ -91,7 +91,7 @@ def side_effect(command, *args, **kwargs): cmd=command, returncode=2, output=b"Process running up to here...", - stderr=b"Some error occured", + stderr=b"Some error occurred", ) mock_subprocess.run.side_effect = side_effect @@ -100,7 +100,7 @@ def side_effect(command, *args, **kwargs): _ = self.runner._execute_pytest(["--option", "--ignore=batata"]) assert ( str(exp.value) - == "Pytest exited with non-zero code 2.\nThis is likely not a problem with label-analysis. Check pytest's output and options.\nPYTEST OUTPUT:\nProcess running up to here...\nSome error occured" + == "Pytest exited with non-zero code 2.\nThis is likely not a problem with label-analysis. Check pytest's output and options.\nPYTEST OUTPUT:\nProcess running up to here...\nSome error occurred" ) @patch("codecov_cli.runners.pytest_standard_runner.subprocess") @@ -112,7 +112,7 @@ def side_effect(command, *args, **kwargs): raise CalledProcessError( cmd=command, returncode=2, - stderr=b"Some error occured", + stderr=b"Some error occurred", ) mock_subprocess.run.side_effect = side_effect @@ -134,26 +134,26 @@ def side_effect(command, *args, **kwargs): cmd=["python", "-m", "pytest", "missing_label"], returncode=2, output=b"Process running up to here...", - stderr=b"Some error occured", + stderr=b"Some error occurred", ), - "\nProcess running up to here...\nSome error occured", + "\nProcess running up to here...\nSome error occurred", ), ( CalledProcessError( cmd=["python", "-m", "pytest", "missing_label"], returncode=2, output="Process running up to here...", - stderr="Some error occured", + stderr="Some error occurred", ), - "\nProcess running up to here...\nSome error occured", + "\nProcess running up to here...\nSome error occurred", ), ( CalledProcessError( cmd=["python", "-m", "pytest", "missing_label"], returncode=2, - stderr=b"Some error occured", + stderr=b"Some error occurred", ), - "\nSome error occured", + "\nSome error occurred", ), ], ) diff --git a/tests/services/report/test_report_results.py b/tests/services/report/test_report_results.py index f713ce6b4..0e3d3ad6d 100644 --- a/tests/services/report/test_report_results.py +++ b/tests/services/report/test_report_results.py @@ -215,7 +215,7 @@ def test_get_report_results_200_error(mocker, capsys): mocked_response.assert_called_once() assert ( "error", - 'An error occured while processing the report. Please try again later. --- {"response_status_code": 200, "state": "error", "result": {}}', + 'An error occurred while processing the report. Please try again later. --- {"response_status_code": 200, "state": "error", "result": {}}', ) in output diff --git a/tests/services/static_analysis/test_static_analysis_service.py b/tests/services/static_analysis/test_static_analysis_service.py index 635eecf90..461ed6844 100644 --- a/tests/services/static_analysis/test_static_analysis_service.py +++ b/tests/services/static_analysis/test_static_analysis_service.py @@ -286,7 +286,7 @@ async def test_send_single_upload_put_fail_exception(self, mocker): async def side_effect(presigned_put, data): if presigned_put == "http://storage-url-003": - raise httpx.HTTPError("Some error occured in the request") + raise httpx.HTTPError("Some error occurred in the request") mock_client.put.side_effect = side_effect