Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5433f6

Browse files
authored
Merge pull request #11939 from timhoffm/alias-signature
Improve alias signatures
2 parents 87a639d + 1093f98 commit d5433f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ class so far, an alias named ``get_alias`` will be defined; the same will
19151915
return functools.partial(_define_aliases, alias_d)
19161916

19171917
def make_alias(name): # Enforce a closure over *name*.
1918+
@functools.wraps(getattr(cls, name))
19181919
def method(self, *args, **kwargs):
19191920
return getattr(self, name)(*args, **kwargs)
19201921
return method

0 commit comments

Comments
 (0)