Skip to content

Commit f74933f

Browse files
authored
🚨 make pyright happy
1 parent 52eddca commit f74933f

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

nb_cli/cli/commands/adapter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ async def create(
197197
try:
198198
output_dir = (
199199
await ListPrompt(
200-
_("Where to store the adapter?"), [*detected, Choice(_("Other"))]
200+
_("Where to store the adapter?"),
201+
[*detected, Choice[None](_("Other"))],
201202
).prompt_async(style=CLI_DEFAULT_STYLE)
202203
).name
203204
if output_dir == _("Other"):

nb_cli/cli/commands/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ async def create(
203203
try:
204204
output_dir = (
205205
await ListPrompt(
206-
_("Where to store the plugin?"), [*detected, Choice(_("Other"))]
206+
_("Where to store the plugin?"),
207+
[*detected, Choice[None](_("Other"))],
207208
).prompt_async(style=CLI_DEFAULT_STYLE)
208209
).name
209210
if output_dir == _("Other"):

nb_cli/locale/zh_CN/LC_MESSAGES/nb-cli.po

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: nb-cli 1.0.0\n"
99
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10-
"POT-Creation-Date: 2024-09-08 08:07+0000\n"
10+
"POT-Creation-Date: 2024-09-08 08:37+0000\n"
1111
"PO-Revision-Date: 2023-01-11 08:56+0000\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language: zh_Hans_CN\n"
@@ -16,7 +16,7 @@ msgstr ""
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=utf-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
19-
"Generated-By: Babel 2.14.0\n"
19+
"Generated-By: Babel 2.16.0\n"
2020

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

121-
#: nb_cli/cli/commands/adapter.py:200 nb_cli/cli/commands/adapter.py:203
122-
#: nb_cli/cli/commands/plugin.py:206 nb_cli/cli/commands/plugin.py:209
121+
#: nb_cli/cli/commands/adapter.py:201 nb_cli/cli/commands/adapter.py:204
122+
#: nb_cli/cli/commands/plugin.py:207 nb_cli/cli/commands/plugin.py:210
123123
msgid "Other"
124124
msgstr "其他"
125125

126-
#: nb_cli/cli/commands/adapter.py:205 nb_cli/cli/commands/adapter.py:214
127-
#: nb_cli/cli/commands/plugin.py:211 nb_cli/cli/commands/plugin.py:221
126+
#: nb_cli/cli/commands/adapter.py:206 nb_cli/cli/commands/adapter.py:215
127+
#: nb_cli/cli/commands/plugin.py:212 nb_cli/cli/commands/plugin.py:222
128128
msgid "Output Dir:"
129129
msgstr "输出目录:"
130130

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

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

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

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

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

432-
#: nb_cli/handlers/meta.py:127 nb_cli/handlers/meta.py:190
433-
#: nb_cli/handlers/meta.py:249
432+
#: nb_cli/handlers/meta.py:123 nb_cli/handlers/meta.py:186
433+
#: nb_cli/handlers/meta.py:245
434434
msgid "Exit code {code}"
435435
msgstr "退出码 {code}"
436436

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

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

445-
#: nb_cli/handlers/meta.py:216
445+
#: nb_cli/handlers/meta.py:212
446446
msgid "NoneBot is not installed."
447447
msgstr "NoneBot 未安装."
448448

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

453-
#: nb_cli/handlers/meta.py:275
453+
#: nb_cli/handlers/meta.py:271
454454
msgid "pip is not installed."
455455
msgstr "pip 未安装."
456456

0 commit comments

Comments
 (0)