gh-107409: set __wrapped__ attribute in reprlib.recursive_repr (#107410)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
denballakh 2023-08-10 11:55:49 +05:00 committed by GitHub
parent 0f2fb6efb4
commit 4845b9712f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -29,6 +29,7 @@ def recursive_repr(fillvalue='...'):
wrapper.__name__ = getattr(user_function, '__name__')
wrapper.__qualname__ = getattr(user_function, '__qualname__')
wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
wrapper.__wrapped__ = user_function
return wrapper
return decorating_function