Skip to content

Use functools.wraps in profile decorator#300

Merged
fabianp merged 2 commits intopythonprofilers:masterfrom
staftermath:use_wraps
Dec 3, 2020
Merged

Use functools.wraps in profile decorator#300
fabianp merged 2 commits intopythonprofilers:masterfrom
staftermath:use_wraps

Conversation

@staftermath
Copy link
Copy Markdown
Contributor

@staftermath staftermath commented Nov 29, 2020

This will prevent unwanted local variable and provide proper doc and name from original function. This is to resolve #299

@fabianp
Copy link
Copy Markdown
Collaborator

fabianp commented Nov 29, 2020

Thanks for the patch. Would it be possible to add a test for this?

@staftermath
Copy link
Copy Markdown
Contributor Author

Thanks for the patch. Would it be possible to add a test for this?

Added a test to cover this. Not sure what is your preferred way to name the test file. Please feel free to rename it to your satsifactory.

@fabianp
Copy link
Copy Markdown
Collaborator

fabianp commented Dec 3, 2020

looks good to me. Thanks for the contribution!

@fabianp fabianp merged commit 685b5f8 into pythonprofilers:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

profile decorator may need to use functools.wrap

2 participants