Skip to content

Commit

Permalink
fix: 渲染时应该使用 name 而不是 error.name
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Nov 15, 2024
1 parent 65374e6 commit 378aa09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ PyPI 项目名 {{ input }} 不符合规范。<dt>请确保项目名正确。</dt
{%- elif type == "string_too_long" %}
{{ name }}: 字符过多。<dt>请确保其不超过 {{ ctx.max_length }} 个字符。</dt>
{%- else %}
{{ error.name }}: {{ error.msg }}
{{ name }}: {{ error.msg }}
{%- endif %}
{%- endmacro %}
6 changes: 3 additions & 3 deletions tests/github/publish/render/test_publish_render_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ async def test_render_error_plugin_load_test(app: App):
**⚠️ 在发布检查过程中,我们发现以下问题:**
<pre><code><li>⚠️ : 无法获取到插件元数据。</li><li>⚠️ 插件加载测试未通过。<details><summary>测试输出</summary>output</details></li></code></pre>
<pre><code><li>⚠️ 插件测试元数据: 无法获取到插件元数据。</li><li>⚠️ 插件加载测试未通过。<details><summary>测试输出</summary>output</details></li></code></pre>
<details>
<summary>详情</summary>
Expand Down Expand Up @@ -357,7 +357,7 @@ async def test_render_error_plugin_metadata(app: App, mocker: MockFixture):
**⚠️ 在发布检查过程中,我们发现以下问题:**
<pre><code><li>⚠️ : 无法获取到插件元数据。</li></code></pre>
<pre><code><li>⚠️ 插件测试元数据: 无法获取到插件元数据。</li></code></pre>
<details>
<summary>详情</summary>
Expand Down Expand Up @@ -550,7 +550,7 @@ async def test_render_unknown_error(app: App, mocker: MockFixture):
**⚠️ 在发布检查过程中,我们发现以下问题:**
<pre><code><li>⚠️ : unknown error</li></code></pre>
<pre><code><li>⚠️ tests &gt; 2 &gt; test: unknown error</li></code></pre>
<details>
<summary>详情</summary>
Expand Down

0 comments on commit 378aa09

Please sign in to comment.