Skip to content

Commit

Permalink
[melobot] Better semantic change
Browse files Browse the repository at this point in the history
  • Loading branch information
aicorein committed Nov 30, 2024
1 parent 66dc4bb commit 848dec3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/melobot/di.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,8 @@ def _init_auto_deps(func: Callable[P, T], allow_manual_arg: bool) -> None:
try:
sign = signature(func)
except ValueError as e:
if (
str(e).startswith("no signature found for builtin")
and version_info.major >= 3
and version_info.minor <= 10
):
tip = "no signature found for builtin"
if str(e).startswith(tip) and version_info <= (3, 10):
raise DependInitError(
f"内建函数 {func} 在 python <= 3.10 的版本中,无法进行依赖注入"
) from None
Expand Down

0 comments on commit 848dec3

Please sign in to comment.