-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transform callables wrap original qfunc #5857
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I cannot find inspect
among the required packages, but looks like is already used everywhere in the source code
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5857 +/- ##
==========================================
- Coverage 99.67% 99.67% -0.01%
==========================================
Files 421 421
Lines 40189 39894 -295
==========================================
- Hits 40060 39764 -296
- Misses 129 130 +1 ☔ View full report in Codecov by Sentry. |
Context:
Issue #5843 made me realize when we apply a transform to a qfunc callable, we should use
functools.wraps
to preserve the docstring and signature of the original function.Description of the Change:
Adds
functools.wraps
to the transformed qfunc.Benefits:
transformed qfunc's keep information about the original function.
Possible Drawbacks:
Related GitHub Issues:
Fixes #5843