We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fe6758 commit 129a4d1Copy full SHA for 129a4d1
spec-0007/transition_to_rng.py
@@ -1,5 +1,6 @@
1
import numpy as np
2
import functools
3
+import inspect
4
import warnings
5
6
@@ -160,6 +161,17 @@ def wrapper(*args, **kwargs):
160
161
162
return fun(*args, **kwargs)
163
164
+ # Add the old parameter name to the function signature
165
+ wrapped_signature = inspect.signature(fun)
166
+ wrapper.__signature__ = wrapped_signature.replace(
167
+ parameters=[
168
+ *wrapped_signature.parameters.values(),
169
+ inspect.Parameter(
170
+ old_name, inspect.Parameter.KEYWORD_ONLY, default=None
171
+ ),
172
+ ]
173
+ )
174
+
175
return wrapper
176
177
return decorator
0 commit comments