You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Two steps are required to replicate the issue
Edit setup.cfg in the pandas home, and in the flake8-rst section, remove from the exclude list the file doc/source/whatsnew/v0.7.0.rst / v0.7.1.rst / v0.7.2.rst, doc/source/whatsnew/v0.8.1.rst
Remove the import block ( from pandas import *) from the lines (8-11) of the file v0.14.*.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 version 0.7.0 or higher):
$ flake8-rst doc/source/whatsnew/v0.7.*
doc/source/whatsnew/v0.7.0.rst:36:9: F821 undefined name 'DataFrame'
doc/source/whatsnew/v0.7.0.rst:36:19: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.0.rst:121:9: F821 undefined name 'Series'
doc/source/whatsnew/v0.7.0.rst:121:16: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.0.rst:140:17: F821 undefined name 'DataFrame'
doc/source/whatsnew/v0.7.0.rst:140:27: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.0.rst:177:16: F821 undefined name 'Series'
doc/source/whatsnew/v0.7.0.rst:177:23: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.0.rst:240:8: F821 undefined name 'Series'
doc/source/whatsnew/v0.7.0.rst:240:15: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.0.rst:251:8: F821 undefined name 'Series'
doc/source/whatsnew/v0.7.0.rst:251:15: F821 undefined name 'randn'
doc/source/whatsnew/v0.7.3.rst:26:19: F821 undefined name 'df'
doc/source/whatsnew/v0.7.3.rst:36:4: F821 undefined name 'df'
doc/source/whatsnew/v0.7.3.rst:43:4: F821 undefined name 'df'
doc/source/whatsnew/v0.7.3.rst:61:13: F821 undefined name 'Series'
doc/source/whatsnew/v0.7.3.rst:91:10: F821 undefined name 'DataFrame'
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.
cc: @datapythonista
The text was updated successfully, but these errors were encountered:
@datapythonista : there is a code block that throws and flake error. From file v.0.7.3.rst. The error is F821 undefined name 'df' on the line scatter_matrix(df, alpha=0.2) . A presaved scatter plot image is loaded in next line. So the scatter_matrix(df, alpha=0.2) is just for illustration. Should I just add a # noqa line here?
xref: #24177
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.
Two steps are required to replicate the issue
Edit
setup.cfg
in the pandas home, and in the flake8-rst section, remove from theexclude
list the filedoc/source/whatsnew/v0.7.0.rst / v0.7.1.rst / v0.7.2.rst
,doc/source/whatsnew/v0.8.1.rst
Remove the import block (
from pandas import *
) from the lines (8-11) of the filev0.14.*.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
version 0.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.
cc: @datapythonista
The text was updated successfully, but these errors were encountered: