Skip to content

Commit

Permalink
adjust output
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Dec 18, 2023
1 parent 857ec40 commit 2d463b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nb_cli_plugin_bootstrap/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.5"
__version__ = "0.1.5.post1"
24 changes: 12 additions & 12 deletions nb_cli_plugin_bootstrap/handlers/update_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ async def summary_infos(
changed_others = {k: v for k, v in changed_pkgs.items() if k not in changed_plugins}

info_li: List[str] = []
if changed_plugins:
updated_title = click.style(
f"已更新{len(changed_plugins)} 个):",
fg="green",
if unchanged_infos:
unchanged_title = click.style(
f"版本未变{len(unchanged_infos)} 个):",
fg="yellow",
bold=True,
)
updated_plugins = style_change_dict(changed_plugins)
info_li.append(f"{updated_title}\n{updated_plugins}")
unchanged_plugins = "\n".join(f" {x.name}" for x in unchanged_infos)
info_li.append(f"{unchanged_title}\n{unchanged_plugins}")

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

if unchanged_infos:
unchanged_title = click.style(
f"版本未变{len(unchanged_infos)} 个):",
fg="yellow",
if changed_plugins:
updated_title = click.style(
f"已更新{len(changed_plugins)} 个):",
fg="green",
bold=True,
)
unchanged_plugins = "\n".join(f" {x.name}" for x in unchanged_infos)
info_li.append(f"{unchanged_title}\n{unchanged_plugins}")
updated_plugins = style_change_dict(changed_plugins)
info_li.append(f"{updated_title}\n{updated_plugins}")

if fail_infos:
fail_title = click.style(
Expand Down

0 comments on commit 2d463b5

Please sign in to comment.