File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -307,15 +307,15 @@ def isgeneratorfunction(obj):
307307
308308def _has_coroutine_mark (f ):
309309 while True :
310- # Direct marker check
311- if getattr (f , "_is_coroutine_marker" , None ) is _is_coroutine_mark :
312- return True
313-
314310 # Methods: unwrap first (methods cannot be coroutine-marked)
315311 if ismethod (f ):
316312 f = f .__func__
317313 continue
318314
315+ # Direct marker check
316+ if getattr (f , "_is_coroutine_marker" , None ) is _is_coroutine_mark :
317+ return True
318+
319319 # Functions created by partialmethod descriptors keep a __partialmethod__ reference
320320 pm = getattr (f , "__partialmethod__" , None )
321321 if isinstance (pm , functools .partialmethod ):
@@ -329,7 +329,6 @@ def _has_coroutine_mark(f):
329329
330330 return False
331331
332-
333332def markcoroutinefunction (func ):
334333 """
335334 Decorator to ensure callable is recognised as a coroutine function.
You can’t perform that action at this time.
0 commit comments