From f1506de907c4e76632b1abb4f2f72e2e88a3f61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=8E=E6=98=8E?= Date: Fri, 10 May 2024 13:57:44 +0800 Subject: [PATCH] version 0.0.9 --- setup.py | 2 +- wxhook/__init__.py | 2 +- wxhook/core.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 20f2880..5681ce5 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ URL = 'https://github.com/miloira/wxhook' EMAIL = '690126048@qq.com' AUTHOR = 'Msky' REQUIRES_PYTHON = '>=3.8.0' -VERSION = '0.0.8' +VERSION = '0.0.9' # What packages are required for this module to be executed? REQUIRED = [ diff --git a/wxhook/__init__.py b/wxhook/__init__.py index 686d97e..1321124 100644 --- a/wxhook/__init__.py +++ b/wxhook/__init__.py @@ -1,3 +1,3 @@ from .core import Bot -version = "0.0.8" +version = "0.0.9" diff --git a/wxhook/core.py b/wxhook/core.py index 76335cc..368fdc9 100644 --- a/wxhook/core.py +++ b/wxhook/core.py @@ -41,11 +41,11 @@ class Bot: def __init__( self, - on_login: typing.Callable = None, - on_before_message: typing.Callable = None, - on_after_message: typing.Callable = None, - on_start: typing.Callable = None, - on_stop: typing.Callable = None, + on_login: typing.Optional[typing.Callable[["Bot", Event], typing.Any]] = None, + on_before_message: typing.Optional[typing.Callable[["Bot", Event], typing.Any]] = None, + on_after_message: typing.Optional[typing.Callable[["Bot", Event], typing.Any]] = None, + on_start: typing.Optional[typing.Callable[["Bot"], typing.Any]] = None, + on_stop: typing.Optional[typing.Callable[["Bot"], typing.Any]] = None, faked_version: typing.Optional[str] = None ): self.version = "3.9.5.81"