nonebot2/tests/plugins/param/param_exception.py

11 lines
202 B
Python
Raw Permalink Normal View History

2021-12-20 14:31:48 +08: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