Lines Matching refs:inspect

63 import inspect
100 if not inspect.isclass(cls):
105 if inspect.ismethod(obj):
108 if (inspect.isclass(self) and
114 elif inspect.isfunction(obj):
119 elif inspect.isbuiltin(obj):
122 if (inspect.isclass(self) and
135 elif inspect.ismethoddescriptor(obj) or inspect.isdatadescriptor(obj):
140 if inspect.ismemberdescriptor(obj):
184 return inspect.cleandoc(doc)
188 result = _getdoc(object) or inspect.getcomments(object)
209 return not (inspect.ismodule(object) or inspect.isclass(object) or
210 inspect.isroutine(object) or inspect.isframe(object) or
211 inspect.istraceback(object) or inspect.iscode(object))
239 if inspect.ismethod(fn):
241 if inspect.isbuiltin(fn):
243 return not (inspect.ismodule(self) or (self is None))
249 for key, value in inspect.getmembers(cl, inspect.isroutine):
301 """Wrap inspect.classify_class_attrs, with fixup for data descriptors."""
303 for (name, kind, cls, value) in inspect.classify_class_attrs(object):
304 if inspect.isdatadescriptor(value):
474 # 'try' clause is to attempt to handle the possibility that inspect
479 if inspect.ismodule(object): return self.docmodule(*args)
480 if inspect.isclass(object): return self.docclass(*args)
481 if inspect.isroutine(object): return self.docroutine(*args)
484 if inspect.isdatadescriptor(object): return self.docdata(*args)
499 file = inspect.getabsfile(object)
723 """Produce HTML for a class tree as given by inspect.getclasstree()."""
757 path = inspect.getabsfile(object)
779 modules = inspect.getmembers(object, inspect.ismodule)
782 for key, value in inspect.getmembers(object, inspect.isclass):
785 (inspect.getmodule(value) or object) is object):
798 for key, value in inspect.getmembers(object, inspect.isroutine):
801 inspect.isbuiltin(value) or inspect.getmodule(value) is object):
805 if inspect.isfunction(value): fdict[value] = fdict[key]
807 for key, value in inspect.getmembers(object, isdata):
832 self.formattree(inspect.getclasstree(classlist, 1), name)]
879 mro = deque(inspect.getmro(object))
1004 signature = inspect.signature(object)
1044 if (inspect.iscoroutinefunction(object) or
1045 inspect.isasyncgenfunction(object)):
1053 if cl and inspect.getattr_static(cl, realname, []) is object:
1062 if inspect.isroutine(object):
1064 signature = inspect.signature(object)
1186 """Render in text a class tree as returned by inspect.getclasstree()."""
1222 for key, value in inspect.getmembers(object, inspect.isclass):
1225 or (inspect.getmodule(value) or object) is object):
1229 for key, value in inspect.getmembers(object, inspect.isroutine):
1232 inspect.isbuiltin(value) or inspect.getmodule(value) is object):
1236 for key, value in inspect.getmembers(object, isdata):
1256 for key, value in inspect.getmembers(object, inspect.ismodule):
1267 inspect.getclasstree(classlist, 1), name)]
1296 file = inspect.getabsfile(object)
1323 signature = inspect.signature(object)
1336 mro = deque(inspect.getmro(object))
1478 if (inspect.iscoroutinefunction(object) or
1479 inspect.isasyncgenfunction(object)):
1487 if cl and inspect.getattr_static(cl, realname, []) is object:
1492 if inspect.isroutine(object):
1494 signature = inspect.signature(object)
1689 if inspect.ismodule(thing):
1696 if inspect.isbuiltin(thing):
1698 if inspect.isgetsetdescriptor(thing):
1702 if inspect.ismemberdescriptor(thing):
1706 if inspect.isclass(thing):
1708 if inspect.isfunction(thing):
1710 if inspect.ismethod(thing):
1760 module = inspect.getmodule(object)
1766 if not (inspect.ismodule(object) or
1767 inspect.isclass(object) or
1768 inspect.isroutine(object) or
1769 inspect.isdatadescriptor(object) or
1894 'FUNCTIONS CLASSES MODULES FILES inspect'),
1992 if inspect.stack()[1][3] == '?':