Spaces Data
Minimal test - lines (116, 128)
path: .spaces[4].spaces[0].metrics.loc.sloc
old: 8.0
new: 13.0
path: .spaces[4].spaces[0].metrics.loc.cloc
old: 1.0
new: 6.0
path: .spaces[4].spaces[0].metrics.mi.mi_visual_studio
old: 63.18047010968101
new: 58.58092238122278
path: .spaces[4].spaces[0].metrics.mi.mi_sei
old: 106.4067607555742
new: 112.45489195156328
path: .spaces[4].spaces[0].metrics.mi.mi_original
old: 108.03860388755452
new: 100.17337727189096
Code
def __init__(self, func, args, kwds):
self.gen = func(*args, **kwds)
self.func, self.args, self.kwds = func, args, kwds
# Issue 19330: ensure context manager instances have good docstrings
doc = getattr(func, "__doc__", None)
if doc is None:
doc = type(self).__doc__
self.__doc__ = doc
# Unfortunately, this still doesn't provide good help output when
# inspecting the created context manager instances, since pydoc
# currently bypasses the instance docstring and shows the docstring
# for the class instead.
# See http://bugs.python.org/issue19404 for more details.