Skip to content

Commit 2d463b5

Browse files
committed
adjust output
1 parent 857ec40 commit 2d463b5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

nb_cli_plugin_bootstrap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.5"
1+
__version__ = "0.1.5.post1"

nb_cli_plugin_bootstrap/handlers/update_project.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ async def summary_infos(
7474
changed_others = {k: v for k, v in changed_pkgs.items() if k not in changed_plugins}
7575

7676
info_li: List[str] = []
77-
if changed_plugins:
78-
updated_title = click.style(
79-
f"已更新{len(changed_plugins)} 个):",
80-
fg="green",
77+
if unchanged_infos:
78+
unchanged_title = click.style(
79+
f"版本未变{len(unchanged_infos)} 个):",
80+
fg="yellow",
8181
bold=True,
8282
)
83-
updated_plugins = style_change_dict(changed_plugins)
84-
info_li.append(f"{updated_title}\n{updated_plugins}")
83+
unchanged_plugins = "\n".join(f" {x.name}" for x in unchanged_infos)
84+
info_li.append(f"{unchanged_title}\n{unchanged_plugins}")
8585

8686
if changed_others:
8787
other_title = click.style(
@@ -92,14 +92,14 @@ async def summary_infos(
9292
other_pkgs = style_change_dict(changed_others)
9393
info_li.append(f"{other_title}\n{other_pkgs}")
9494

95-
if unchanged_infos:
96-
unchanged_title = click.style(
97-
f"版本未变{len(unchanged_infos)} 个):",
98-
fg="yellow",
95+
if changed_plugins:
96+
updated_title = click.style(
97+
f"已更新{len(changed_plugins)} 个):",
98+
fg="green",
9999
bold=True,
100100
)
101-
unchanged_plugins = "\n".join(f" {x.name}" for x in unchanged_infos)
102-
info_li.append(f"{unchanged_title}\n{unchanged_plugins}")
101+
updated_plugins = style_change_dict(changed_plugins)
102+
info_li.append(f"{updated_title}\n{updated_plugins}")
103103

104104
if fail_infos:
105105
fail_title = click.style(

0 commit comments

Comments
 (0)