Skip to content

Commit

Permalink
🐛 version 1.7.43 fix shortcut command _
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Feb 7, 2024
1 parent ca591cc commit 6b060d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
.pdm-python
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 更新日志

## Alconna 1.7.43
### 修复
- 修复快捷指令使用 `_` 时的异常错误

## Alconna 1.7.42

### 改进
Expand Down
2 changes: 1 addition & 1 deletion src/arclet/alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from .typing import UnpackVar as UnpackVar
from .typing import Up as Up

__version__ = "1.7.42"
__version__ = "1.7.43"

# backward compatibility
Arpamar = Arparma
Expand Down
2 changes: 1 addition & 1 deletion src/arclet/alconna/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def shortcut(self, key: str, args: ShortcutArgs | None = None, delete: bool = Fa
return command_manager.add_shortcut(self, key, args)
elif cmd := command_manager.recent_message:
alc = command_manager.last_using
if alc and alc == self:
if alc and alc == self.path:
return command_manager.add_shortcut(self, key, {"command": cmd}) # type: ignore
raise ValueError(
lang.require("shortcut", "recent_command_error").format(
Expand Down

0 comments on commit 6b060d1

Please sign in to comment.