From a1bec32a7bd0109078a857082b2e83615c8423c7 Mon Sep 17 00:00:00 2001 From: Zanie Date: Thu, 26 Oct 2023 17:22:27 -0500 Subject: [PATCH] Fix error rendering --- python/ruff-ecosystem/ruff_ecosystem/check.py | 2 +- python/ruff-ecosystem/ruff_ecosystem/format.py | 2 +- python/ruff-ecosystem/ruff_ecosystem/markdown.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ruff-ecosystem/ruff_ecosystem/check.py b/python/ruff-ecosystem/ruff_ecosystem/check.py index aeaa25569e..ec5d782659 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/check.py +++ b/python/ruff-ecosystem/ruff_ecosystem/check.py @@ -194,7 +194,7 @@ def markdown_check_result(result: Result) -> str: lines.extend( markdown_project_section( title="error", - content=f"```\n{error.strip()}```", + content=f"```\n{error}```", options=project.check_options, project=project, ) diff --git a/python/ruff-ecosystem/ruff_ecosystem/format.py b/python/ruff-ecosystem/ruff_ecosystem/format.py index ad4f987bb9..697e5dd4c2 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/format.py +++ b/python/ruff-ecosystem/ruff_ecosystem/format.py @@ -77,7 +77,7 @@ def markdown_format_result(result: Result) -> str: lines.extend( markdown_project_section( title="error", - content=str(error), + content=f"```\n{error}```", options=project.format_options, project=project, ) diff --git a/python/ruff-ecosystem/ruff_ecosystem/markdown.py b/python/ruff-ecosystem/ruff_ecosystem/markdown.py index 002d7cb9ba..e0154834f9 100644 --- a/python/ruff-ecosystem/ruff_ecosystem/markdown.py +++ b/python/ruff-ecosystem/ruff_ecosystem/markdown.py @@ -7,7 +7,7 @@ if TYPE_CHECKING: def markdown_project_section( - title: str, content: str | list[str], options: str, project: Project + title: str, content: str | list[str], options: object, project: Project ) -> list[str]: return markdown_details( summary=f'{project.repo.fullname} ({title})',