MCPcopy
hub / github.com/prompt-toolkit/ptpython / _has_coroutine_flag

Function _has_coroutine_flag

src/ptpython/repl.py:76–81  ·  view source on GitHub ↗
(code: types.CodeType)

Source from the content-addressed store, hash-verified

74
75
76def _has_coroutine_flag(code: types.CodeType) -> bool:
77 if COROUTINE_FLAG is None:
78 # Not supported on this Python version.
79 return False
80
81 return bool(code.co_flags & COROUTINE_FLAG)
82
83
84class PythonRepl(PythonInput):

Callers 2

evalMethod · 0.85
eval_asyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected