-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
CLN: a batch of replacements of @Appender() with @doc() #33021
CLN: a batch of replacements of @Appender() with @doc() #33021
Conversation
faec169
to
1b8420c
Compare
I keep getting an error from a failed pytest. This happens in CI, see https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=31810&view=logs&j=3a03f79d-0b41-5610-1aa4-b4a014d0bc70&t=4d05ed0e-1ed3-5bff-dd63-1e957f2766a9 pandas\tests\frame\methods\test_shift.py F [100%] ================================================================================================================================ FAILURES ================================================================================================================================= self = <pandas.tests.frame.methods.test_shift.TestDataFrameShift object at 0x0000020E4201C088>
pandas\tests\frame\methods\test_shift.py:195: self = <contextlib._GeneratorContextManager object at 0x0000020E42021BC8>, type = None, value = None, traceback = None
E AssertionError: Warning not set with correct stacklevel. File where warning is raised: C:\Users\David\source\repos\pandas-smartvinnetou\pandas\core\frame.py != C:\Users\David\source\repos\pandas-smartvinnetou\pandas\tests\frame\methods\test_shift.py. W ......\AppData\Local\Programs\Python\Python37\lib\contextlib.py:119: AssertionError (pandas-dev) C:\Users\David\source\repos\pandas-smartvinnetou> Can someone shed some light on this failed test? Is this an issue with raising the wrong warning for some reason? |
After more investigation, I believe that the reason of the failed test the change of the depth of the stack introduced by the As the And then there is a mismatch when the failing test is checking the raised warning at https://github.com/pandas-dev/pandas/blob/master/pandas/_testing.py#L2366. I can fix this mismatch by increasing the Can someone who knows the logic behind all this code confirm that this is the right change? @jorisvandenbossche ? |
98f0a5f
to
314efe5
Compare
If the number of wrapping functions increased, then increasing the number specified in |
608bd82
to
cbfb387
Compare
cbfb387
to
b23a01e
Compare
@smartvinnetou thanks a lot! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
core/generic.py