MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_routine

Method _is_routine

Lib/doctest.py:1006–1015  ·  view source on GitHub ↗

Safely unwrap objects and determine if they are functions.

(self, obj)

Source from the content-addressed store, hash-verified

1004 raise ValueError("object must be a class or function")
1005
1006 def _is_routine(self, obj):
1007 """
1008 Safely unwrap objects and determine if they are functions.
1009 """
1010 maybe_routine = obj
1011 try:
1012 maybe_routine = inspect.unwrap(maybe_routine)
1013 except ValueError:
1014 pass
1015 return inspect.isroutine(maybe_routine)
1016
1017 def _find(self, tests, obj, name, module, source_lines, globs, seen):
1018 """

Callers 1

_findMethod · 0.95

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected