-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix docstring of functions created with the deprecate() function #24215
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
Fix docstring of functions created with the deprecate() function #24215
Conversation
Hello @datapythonista! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #24215 +/- ##
===========================================
- Coverage 92.21% 43% -49.21%
===========================================
Files 162 162
Lines 51763 51766 +3
===========================================
- Hits 47733 22262 -25471
- Misses 4030 29504 +25474
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24215 +/- ##
==========================================
+ Coverage 92.21% 92.21% +<.01%
==========================================
Files 162 162
Lines 51763 51765 +2
==========================================
+ Hits 47733 47735 +2
Misses 4030 4030
Continue to review full report at Codecov.
|
|
||
import pytest | ||
|
||
from pandas.util._decorators import deprecate |
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.
are these inplace of tests_deprecate_kwarg.py? (this is pretty new)
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.
No, they are different. We have an old (I guess) deprecate
that is used to deprecate argmax
(and argmin
) with deprecate('argmax', idmax)
.
The function was not tested, and I had to modify it, because it was injecting the .. deprecate::
directive in a way that the docstring format was wrong.
…yself less happy)
lgtm. @jorisvandenbossche or @TomAugspurger |
LGTM, thanks. |
…das-dev#24215) * Fix docstring of functions created with the deprecate() function * Allowing deprecate to be used with functions without docstring
…das-dev#24215) * Fix docstring of functions created with the deprecate() function * Allowing deprecate to be used with functions without docstring
Functions created with
deprecate
function inpandas.util._decorators
are causing us some problems, for example in #24188, as the docstring is created automatically, and the.. deprecate::
directive was added at the start. This PR fixes the docstring of the functions created withdeprecate
and adds tests to the function, as they were non-existent.git diff upstream/master -u -- "*.py" | flake8 --diff