-
Notifications
You must be signed in to change notification settings - Fork 39
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
Use wrapt instead of functools.wraps in order to preserve function si… #198
Conversation
@jwelch92 this is looking good so far. I notice it's a draft but figured I'd take a look and provide some feedback. The linting is breaking in the CI build - can you take a look? Also, in testing the update with the same scenario you provided in the issue, I am seeing the same result. These two things may be related, let us know what you think! CI Linting error:
Result using updated Example function: example_traced
Full Arg Spec: FullArgSpec(args=[], varargs='args', varkw='kwargs', defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={'return': None})
Signature: (a: str, b: str, c: Optional[str] = None) -> None |
Thanks for taking a look @JamieDanielson! I'll try to address this feedback when I get a chance. Are there any guidelines or rules for when it is appropriate to supress linting rules? Based on Thanks! |
Hey @jwelch92, As far as the linter errors, I believe they are trying to tell us that the callers of those functions supply a different number of arguments from what's defined in the signature (not that those arguments are unused inside the function definition). That does appear to be the case, though I am unsure if that's intentional or not -- there's like several layers of higher order functions in there 😅 I assume this is the same issue described here I think if it is intentional, and the decorators are meant to change the function signature, we can use |
Marking this PR as stale because it has been open 30 days with no activity. Please add a comment if this PR is still relevant; otherwise this PR will be automatically closed in 7 days. |
Closing this PR due to inactivity. Please see our Honeycomb OSS Lifecyle and Practices. |
…gnatures.
Which problem is this PR solving?
Short description of the changes
functools.wraps
to use thewrapt.decorator
decorator instead. This allows beeline traced functions to keep their original signature intact.