Skip to content

Commit 204d29f

Browse files
committed
Do not touch coroutines
1 parent faee488 commit 204d29f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

jupyter_server/auth/decorator.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ def allow_unauthenticated(method: FuncT) -> FuncT:
106106
"""
107107

108108
@wraps(method)
109-
async def wrapper(self, *args, **kwargs):
110-
out = method(self, *args, **kwargs)
111-
# If the method is a coroutine, await it
112-
if asyncio.iscoroutine(out):
113-
return await out
114-
return out
109+
def wrapper(self, *args, **kwargs):
110+
return method(self, *args, **kwargs)
115111

116112
setattr(wrapper, "__allow_unauthenticated", True)
117113

0 commit comments

Comments
 (0)