mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 12:06:45 +00:00
✨ Feature: 兼容 Pydantic v2 (#2544)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -4,3 +4,7 @@ from typing import Union
|
||||
async def exc(e: Exception, x: Union[ValueError, TypeError]) -> Exception:
|
||||
assert e == x
|
||||
return e
|
||||
|
||||
|
||||
async def legacy_exc(exception) -> Exception:
|
||||
return exception
|
||||
|
Reference in New Issue
Block a user