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.18.0.rst & doc/source/whatsnew/v0.18.1.rst
Remove the import block ( from pandas import *) from the lines (8-11) of the file v0.18.*.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.18.*
doc/source/whatsnew/v0.18.0.rst:62:26: E203 whitespace before ':'
doc/source/whatsnew/v0.18.0.rst:62:43: E203 whitespace before ':'
doc/source/whatsnew/v0.18.0.rst:69:30: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:100:13: E999 SyntaxError: invalid syntax
doc/source/whatsnew/v0.18.0.rst:120:14: E203 whitespace before ':'
doc/source/whatsnew/v0.18.0.rst:120:24: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:121:14: E203 whitespace before ':'
doc/source/whatsnew/v0.18.0.rst:121:24: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:199:18: W605 invalid escape sequence '\d'
doc/source/whatsnew/v0.18.0.rst:214:10: W605 invalid escape sequence '\d'
doc/source/whatsnew/v0.18.0.rst:220:10: W605 invalid escape sequence '\d'
doc/source/whatsnew/v0.18.0.rst:268:31: W605 invalid escape sequence '\d'
doc/source/whatsnew/v0.18.0.rst:274:31: W605 invalid escape sequence '\d'
doc/source/whatsnew/v0.18.0.rst:287:19: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:287:23: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:287:30: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:288:19: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:288:23: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:288:30: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:292:27: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:292:31: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:292:38: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:327:50: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:327:60: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:354:28: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:354:30: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:376:20: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:376:22: E231 missing whitespace after ','
doc/source/whatsnew/v0.18.0.rst:725:83: E501 line too long (83 > 79 characters)
doc/source/whatsnew/v0.18.1.rst:51:10: F821 undefined name 'datetime'
doc/source/whatsnew/v0.18.1.rst:170:4: E124 closing bracket does not match visual indentation
doc/source/whatsnew/v0.18.1.rst:185:83: E501 line too long (80 > 79 characters)
doc/source/whatsnew/v0.18.1.rst:315:9: F821 undefined name 'DataFrame'
doc/source/whatsnew/v0.18.1.rst:315:23: E203 whitespace before ':'
doc/source/whatsnew/v0.18.1.rst:316:23: E203 whitespace before ':'
doc/source/whatsnew/v0.18.1.rst:437:92: E501 line too long (84 > 79 characters)
doc/source/whatsnew/v0.18.1.rst:457:93: E501 line too long (84 > 79 characters)
doc/source/whatsnew/v0.18.1.rst:476:29: F821 undefined name 'StringIO'
doc/source/whatsnew/v0.18.1.rst:480:29: F821 undefined name 'StringIO'
doc/source/whatsnew/v0.18.1.rst:488:29: F821 undefined name 'StringIO'
doc/source/whatsnew/v0.18.1.rst:492:29: F821 undefined name 'StringIO'
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:
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
setup.cfg
in the pandas home, and in the flake8-rst section, remove from theexclude
list the filedoc/source/whatsnew/v0.18.0.rst
&doc/source/whatsnew/v0.18.1.rst
from pandas import *
) from the lines (8-11) of the filev0.18.*.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: