Skip to content

Commit

Permalink
🚨 make pyright happy
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Sep 8, 2024
1 parent 52eddca commit f74933f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
3 changes: 2 additions & 1 deletion nb_cli/cli/commands/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ async def create(
try:
output_dir = (
await ListPrompt(
_("Where to store the adapter?"), [*detected, Choice(_("Other"))]
_("Where to store the adapter?"),
[*detected, Choice[None](_("Other"))],
).prompt_async(style=CLI_DEFAULT_STYLE)
).name
if output_dir == _("Other"):
Expand Down
3 changes: 2 additions & 1 deletion nb_cli/cli/commands/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ async def create(
try:
output_dir = (
await ListPrompt(
_("Where to store the plugin?"), [*detected, Choice(_("Other"))]
_("Where to store the plugin?"),
[*detected, Choice[None](_("Other"))],
).prompt_async(style=CLI_DEFAULT_STYLE)
).name
if output_dir == _("Other"):
Expand Down
36 changes: 18 additions & 18 deletions nb_cli/locale/zh_CN/LC_MESSAGES/nb-cli.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: nb-cli 1.0.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-09-08 08:07+0000\n"
"POT-Creation-Date: 2024-09-08 08:37+0000\n"
"PO-Revision-Date: 2023-01-11 08:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_Hans_CN\n"
Expand All @@ -16,7 +16,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.14.0\n"
"Generated-By: Babel 2.16.0\n"

#: nb_cli/cli/__init__.py:51
msgid "The working directory."
Expand Down Expand Up @@ -118,22 +118,22 @@ msgstr "适配器名称:"
msgid "Where to store the adapter?"
msgstr "请输入适配器存储的位置:"

#: nb_cli/cli/commands/adapter.py:200 nb_cli/cli/commands/adapter.py:203
#: nb_cli/cli/commands/plugin.py:206 nb_cli/cli/commands/plugin.py:209
#: nb_cli/cli/commands/adapter.py:201 nb_cli/cli/commands/adapter.py:204
#: nb_cli/cli/commands/plugin.py:207 nb_cli/cli/commands/plugin.py:210
msgid "Other"
msgstr "其他"

#: nb_cli/cli/commands/adapter.py:205 nb_cli/cli/commands/adapter.py:214
#: nb_cli/cli/commands/plugin.py:211 nb_cli/cli/commands/plugin.py:221
#: nb_cli/cli/commands/adapter.py:206 nb_cli/cli/commands/adapter.py:215
#: nb_cli/cli/commands/plugin.py:212 nb_cli/cli/commands/plugin.py:222
msgid "Output Dir:"
msgstr "输出目录:"

#: nb_cli/cli/commands/adapter.py:211 nb_cli/cli/commands/plugin.py:218
#: nb_cli/cli/commands/adapter.py:212 nb_cli/cli/commands/plugin.py:219
msgid "Output dir is not a directory!"
msgstr "输出目录不是一个文件夹!"

#: nb_cli/cli/commands/adapter.py:216 nb_cli/cli/commands/plugin.py:213
#: nb_cli/cli/commands/plugin.py:223
#: nb_cli/cli/commands/adapter.py:217 nb_cli/cli/commands/plugin.py:214
#: nb_cli/cli/commands/plugin.py:224
msgid "Invalid output dir!"
msgstr "无效的输出目录!"

Expand Down Expand Up @@ -421,36 +421,36 @@ msgstr "无法找到项目根目录! {config_file} 文件不存在."
msgid "Using python: {python_path}"
msgstr "使用 Python: {python_path}"

#: nb_cli/handlers/meta.py:85
#: nb_cli/handlers/meta.py:81
msgid "Cannot find a valid Python interpreter."
msgstr "无法找到可用的 Python 解释器."

#: nb_cli/handlers/meta.py:126 nb_cli/handlers/meta.py:135
#: nb_cli/handlers/meta.py:122 nb_cli/handlers/meta.py:131
msgid "Failed to get Python version."
msgstr "获取 Python 版本失败."

#: nb_cli/handlers/meta.py:127 nb_cli/handlers/meta.py:190
#: nb_cli/handlers/meta.py:249
#: nb_cli/handlers/meta.py:123 nb_cli/handlers/meta.py:186
#: nb_cli/handlers/meta.py:245
msgid "Exit code {code}"
msgstr "退出码 {code}"

#: nb_cli/handlers/meta.py:154
#: nb_cli/handlers/meta.py:150
msgid "Python {major}.{minor} is not supported."
msgstr "Python {major}.{minor} 不受支持."

#: nb_cli/handlers/meta.py:189 nb_cli/handlers/meta.py:198
#: nb_cli/handlers/meta.py:185 nb_cli/handlers/meta.py:194
msgid "Failed to get NoneBot version."
msgstr "获取 NoneBot 版本失败."

#: nb_cli/handlers/meta.py:216
#: nb_cli/handlers/meta.py:212
msgid "NoneBot is not installed."
msgstr "NoneBot 未安装."

#: nb_cli/handlers/meta.py:248 nb_cli/handlers/meta.py:257
#: nb_cli/handlers/meta.py:244 nb_cli/handlers/meta.py:253
msgid "Failed to get pip version."
msgstr "获取 pip 版本失败."

#: nb_cli/handlers/meta.py:275
#: nb_cli/handlers/meta.py:271
msgid "pip is not installed."
msgstr "pip 未安装."

Expand Down

0 comments on commit f74933f

Please sign in to comment.