Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Readd sage_wraps in deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Jan 8, 2022
1 parent 6adf9da commit 1b656a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sage/misc/decorators.py
Expand Up @@ -37,6 +37,7 @@
sage_getargspec)
from inspect import ArgSpec


def sage_wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES):
r"""
Decorator factory which should be used in decorators for making sure that
Expand Down Expand Up @@ -397,6 +398,7 @@ def __call__(self, func):
sage: sage_getargspec(f)
ArgSpec(args=['arrow_size'], varargs='args', keywords='kwds', defaults=(2,))
"""
@sage_wraps(func)
def wrapper(func, *args, **kwds):
suboptions = copy(self.options)
suboptions.update(kwds.pop(self.name+"options", {}))
Expand Down Expand Up @@ -485,6 +487,7 @@ def __call__(self, func):
() [('__original_opts', {'alpha': 1}), ('alpha', 1), ('rgbcolor', (0, 0, 1))]
"""
@sage_wraps(func)
def wrapper(func, *args, **kwds):
options = copy(wrapper.options)
if self.original_opts:
Expand Down

0 comments on commit 1b656a3

Please sign in to comment.