Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _patch_doc(cls, kind):
method = getattr(cls, kind)
docstring = _get_doc(cls, kind, get_ipy())
if sys.version_info.major == 2:
method.__func__.__doc__ = docstring
else:
method.__doc__ = docstring