-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fix flake8 issues in doc/source/enhancingperf.rst #24176
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
Comments
I can take this issue. |
@datapythonista, do you have any recommendations for: %prun -l 4 df.apply(lambda x: integrate_f(x['a'], x['b'], x['N']), axis=1) Adding the |
Not sure what's the issue here, does this make sense: %prun -l 4 df.apply(lambda x: integrate_f(x['a'],
x['b'],
x['N']),
axis=1) |
That's what I tried originally, but still getting |
is this failing too? %prun -l 4 df.apply(lambda x: integrate_f(x['a'],
x['b'],
x['N']),
axis=1) # noqa E999 @FHaase I guess those should work in |
Yes, the above example fails as well. |
I guess you also tried: %prun -l 4 df.apply(lambda x: integrate_f(x['a'], # noqa E999
x['b'],
x['N']),
axis=1) Is this the one you mentioned it was too long? For now may be you can add the Otherwise, feel free to open a PR to fix the rest, and may be you can create an issue for this one, and add the link to the issue to the |
The issue with flake8-rst in connection with this line is as follows: flake8-rst takes care of it by removing The solution would be to ignore the complete block from checking. Not ideal, but as issues within the syntax of the checked code result in ignoring all AST-related checks for that block (even when using So my suggestion is to add the custom roles of |
@addisonlynch I think you can for now have that in a Can you open a pull request, so we can see if the rest is correct, and also discuss more in practice this case? |
@datapythonista sounds good, I'll try to get this closed out. |
@addisonlynch are you still working on this? |
We didn't start validating the format of PEP8 and other code standards in the documentation examples until recently. We still have some files with errors, that we need to skip, and that we should fix, so we can start validating them.
The first step of this issue would be edit
setup.cfg
in the pandas home, and in theflake8-rst
section, remove from theexclude
list the filedoc/source/enhancingperf.rst
After that, running the next command will report the errors in the file (note that syntax error usually prevent to validate other errors, and the list of errors to fix can become much longer when the syntax error is fixed (please make sure that you are using
flake8-rst
version0.7.0
or higher):Once all the errors are addressed, please open a pull request with the fixes in the file, and removing the file from
setup.cfg
. If you need to do something that feels wrong to fix an error, please ask in a comment to this issue. Please avoid other unrelated changes, which can be addressed in a separate pull request.The text was updated successfully, but these errors were encountered: