mirror of
https://github.com/nonebot/nonebot2.git
synced 2026-09-17 06:43:48 +00:00
⬆️ auto update by pre-commit hooks (#4181)
Release Drafter / release (push) Skipped
Release Drafter / update-release-draft (push) Failing after 38s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 43s
Ruff Lint / Ruff Lint (push) Successful in 57s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 1m1s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 1m4s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.13) (push) Failing after 1m4s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 1m5s
Site Deploy / publish (push) Failing after 1m8s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.13) (push) Failing after 1m19s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m26s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 1m29s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 1m31s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 1m33s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.13) (push) Canceled after 0s
Release Drafter / release (push) Skipped
Release Drafter / update-release-draft (push) Failing after 38s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 43s
Ruff Lint / Ruff Lint (push) Successful in 57s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 1m1s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 1m4s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.13) (push) Failing after 1m4s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 1m5s
Site Deploy / publish (push) Failing after 1m8s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.13) (push) Failing after 1m19s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m26s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 1m29s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 1m31s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 1m33s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.13) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Canceled after 0s
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.13) (push) Canceled after 0s
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent
9b4772ff8f
commit
206d31a61d
@@ -29,6 +29,7 @@ from nonebot import get_driver
|
||||
|
||||
driver = get_driver()
|
||||
|
||||
|
||||
@driver.on_startup
|
||||
async def do_something():
|
||||
pass
|
||||
@@ -43,6 +44,7 @@ from nonebot import get_driver
|
||||
|
||||
driver = get_driver()
|
||||
|
||||
|
||||
@driver.on_shutdown
|
||||
async def do_something():
|
||||
pass
|
||||
@@ -57,6 +59,7 @@ from nonebot import get_driver
|
||||
|
||||
driver = get_driver()
|
||||
|
||||
|
||||
@driver.on_bot_connect
|
||||
async def do_something(bot: Bot):
|
||||
pass
|
||||
@@ -71,6 +74,7 @@ from nonebot import get_driver
|
||||
|
||||
driver = get_driver()
|
||||
|
||||
|
||||
@driver.on_bot_disconnect
|
||||
async def do_something(bot: Bot):
|
||||
pass
|
||||
@@ -88,6 +92,7 @@ async def do_something(bot: Bot):
|
||||
from nonebot.exception import IgnoredException
|
||||
from nonebot.message import event_preprocessor
|
||||
|
||||
|
||||
@event_preprocessor
|
||||
async def do_something(event: Event):
|
||||
if not event.is_tome():
|
||||
@@ -101,6 +106,7 @@ async def do_something(event: Event):
|
||||
```python
|
||||
from nonebot.message import event_postprocessor
|
||||
|
||||
|
||||
@event_postprocessor
|
||||
async def do_something(event: Event):
|
||||
pass
|
||||
@@ -114,6 +120,7 @@ async def do_something(event: Event):
|
||||
from nonebot.message import run_preprocessor
|
||||
from nonebot.exception import IgnoredException
|
||||
|
||||
|
||||
@run_preprocessor
|
||||
async def do_something(event: Event, matcher: Matcher):
|
||||
if not event.is_tome():
|
||||
@@ -127,6 +134,7 @@ async def do_something(event: Event, matcher: Matcher):
|
||||
```python
|
||||
from nonebot.message import run_postprocessor
|
||||
|
||||
|
||||
@run_postprocessor
|
||||
async def do_something(event: Event, matcher: Matcher, exception: Optional[Exception]):
|
||||
pass
|
||||
@@ -140,6 +148,7 @@ async def do_something(event: Event, matcher: Matcher, exception: Optional[Excep
|
||||
from nonebot.adapters import Bot
|
||||
from nonebot.exception import MockApiException
|
||||
|
||||
|
||||
@Bot.on_calling_api
|
||||
async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]):
|
||||
if api == "send_msg":
|
||||
@@ -154,9 +163,14 @@ async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]):
|
||||
from nonebot.adapters import Bot
|
||||
from nonebot.exception import MockApiException
|
||||
|
||||
|
||||
@Bot.on_called_api
|
||||
async def handle_api_result(
|
||||
bot: Bot, exception: Optional[Exception], api: str, data: Dict[str, Any], result: Any
|
||||
bot: Bot,
|
||||
exception: Optional[Exception],
|
||||
api: str,
|
||||
data: Dict[str, Any],
|
||||
result: Any,
|
||||
):
|
||||
if not exception and api == "send_msg":
|
||||
raise MockApiException(result={**result, "message_id": 123})
|
||||
|
||||
Reference in New Issue
Block a user