Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Repro:
>>>fromreprlibimportrecursive_repr>>>>>>classMy:... @recursive_repr()...def__repr__[T](self,converter:T|None=None): ......>>>My().__repr__.__type_params__()
This happens becauserecursive_repr does not use@wraps, but reinvents it:
Lines 26 to 33 inf2eaa92
| # Can't use functools.wraps() here because of bootstrap issues | |
| wrapper.__module__=getattr(user_function,'__module__') | |
| wrapper.__doc__=getattr(user_function,'__doc__') | |
| wrapper.__name__=getattr(user_function,'__name__') | |
| wrapper.__qualname__=getattr(user_function,'__qualname__') | |
| wrapper.__annotations__=getattr(user_function,'__annotations__', {}) | |
| wrapper.__wrapped__=user_function | |
| returnwrapper |
And__type_params__ was added in#104600