[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2024-10-24 13:22:29 +00:00
parent 9db8b13d9c
commit b33661ff8e
2 changed files with 14 additions and 10 deletions

View File

@@ -68,11 +68,15 @@ def when(target, *args, **kwargs):
if not sig.parameters:
# Function is async: must be awaited
if inspect.iscoroutinefunction(func):
async def wrapper(*args, **kwargs):
await func()
else:
def wrapper(*args, **kwargs):
func()
else:
wrapper = func
except AttributeError: