mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-20 12:40:31 +08:00
Fix doc string injection of deprecated wrapper
This commit is contained in:
@@ -27,9 +27,9 @@ class deprecated(object):
|
||||
|
||||
alt_msg = ''
|
||||
if self.alt_func is not None:
|
||||
alt_msg = ' Use `%s` instead.' % self.alt_func
|
||||
alt_msg = ' Use ``%s`` instead.' % self.alt_func
|
||||
|
||||
msg = 'Call to deprecated function `%s`.' % func.__name__
|
||||
msg = 'Call to deprecated function ``%s``.' % func.__name__
|
||||
msg += alt_msg
|
||||
|
||||
@functools.wraps(func)
|
||||
@@ -48,6 +48,6 @@ class deprecated(object):
|
||||
if wrapped.__doc__ is None:
|
||||
wrapped.__doc__ = doc
|
||||
else:
|
||||
wrapped.__doc__ = doc + '\n\n' + wrapped.__doc__
|
||||
wrapped.__doc__ = doc + '\n\n ' + wrapped.__doc__
|
||||
|
||||
return wrapped
|
||||
|
||||
Reference in New Issue
Block a user