nonebot2/tests/plugins/param/param_exception.py

11 lines
202 B
Python
Raw Normal View History

2021-12-20 06:31:48 +00:00
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