Skip to content

DOC: Fix format of io.rst #23791

Closed
Closed
@datapythonista

Description

@datapythonista

Our documentation should follow the PEP-8 standard, but for historical reasons there are many formats that don't. We should fix them now.

This issue is to fix the format of doc/source/io.rst. To find the errors, first is required to install a newer version of flake8-rst:

conda install -c conda-forge flake8-rst=0.5.0

Then, all the errors can be obtained with:

$ flake8-rst doc/source/io.rst 
doc/source/io.rst:14:4: E402 module level import not at top of file
doc/source/io.rst:19:4: E402 module level import not at top of file
doc/source/io.rst:22:4: E402 module level import not at top of file
doc/source/io.rst:430:88: E501 line too long (84 > 79 characters)
doc/source/io.rst:481:4: E402 module level import not at top of file
doc/source/io.rst:666:17: E126 continuation line over-indented for hanging indent
doc/source/io.rst:680:10: E222 multiple spaces after operator
doc/source/io.rst:721:83: E501 line too long (95 > 79 characters)
doc/source/io.rst:815:10: E222 multiple spaces after operator
doc/source/io.rst:898:4: E402 module level import not at top of file
doc/source/io.rst:995:9: E111 indentation is not a multiple of four
doc/source/io.rst:1019:83: E501 line too long (87 > 79 characters)
doc/source/io.rst:1020:83: E501 line too long (89 > 79 characters)
doc/source/io.rst:1021:83: E501 line too long (95 > 79 characters)
doc/source/io.rst:1036:10: E222 multiple spaces after operator
doc/source/io.rst:1135:10: E222 multiple spaces after operator
doc/source/io.rst:1147:12: E222 multiple spaces after operator
doc/source/io.rst:1169:9: E225 missing whitespace around operator
doc/source/io.rst:1440:55: E231 missing whitespace after ','
doc/source/io.rst:1455:4: E402 module level import not at top of file
doc/source/io.rst:1483:4: E402 module level import not at top of file
doc/source/io.rst:1970:13: E128 continuation line under-indented for visual indent
doc/source/io.rst:1971:13: E128 continuation line under-indented for visual indent
doc/source/io.rst:2023:12: E999 SyntaxError: invalid syntax
doc/source/io.rst:2062:4: E402 module level import not at top of file
doc/source/io.rst:2075:4: E402 module level import not at top of file
doc/source/io.rst:2084:14: E127 continuation line over-indented for visual indent
doc/source/io.rst:2086:19: E126 continuation line over-indented for hanging indent
doc/source/io.rst:2088:14: E127 continuation line over-indented for visual indent
doc/source/io.rst:2089:26: E128 continuation line under-indented for visual indent
doc/source/io.rst:2090:26: E128 continuation line under-indented for visual indent
doc/source/io.rst:2091:13: E127 continuation line over-indented for visual indent
doc/source/io.rst:2094:19: E126 continuation line over-indented for hanging indent
doc/source/io.rst:2149:8: E124 closing bracket does not match visual indentation
doc/source/io.rst:2189:6: E402 module level import not at top of file
doc/source/io.rst:2325:4: E402 module level import not at top of file
doc/source/io.rst:2823:26: E231 missing whitespace after ':'
doc/source/io.rst:2823:44: E231 missing whitespace after ':'
doc/source/io.rst:2824:66: E231 missing whitespace after ','
doc/source/io.rst:2845:83: E501 line too long (80 > 79 characters)
doc/source/io.rst:2853:4: E402 module level import not at top of file
doc/source/io.rst:3175:4: E402 module level import not at top of file
doc/source/io.rst:3252:4: E402 module level import not at top of file
doc/source/io.rst:3309:41: E201 whitespace after '{'
doc/source/io.rst:3309:50: E202 whitespace before '}'
doc/source/io.rst:3424:4: E402 module level import not at top of file
doc/source/io.rst:3438:30: E231 missing whitespace after ','
doc/source/io.rst:3453:4: E402 module level import not at top of file
doc/source/io.rst:3462:28: E127 continuation line over-indented for visual indent
doc/source/io.rst:3467:28: E127 continuation line over-indented for visual indent
doc/source/io.rst:3481:13: E128 continuation line under-indented for visual indent
doc/source/io.rst:3482:13: E128 continuation line under-indented for visual indent
doc/source/io.rst:3484:37: E225 missing whitespace around operator
doc/source/io.rst:3485:12: E128 continuation line under-indented for visual indent
doc/source/io.rst:3486:12: E126 continuation line over-indented for hanging indent
doc/source/io.rst:3588:30: E241 multiple spaces after ','
doc/source/io.rst:3663:38: E231 missing whitespace after ':'
doc/source/io.rst:3670:52: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3670:54: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3823:83: E501 line too long (81 > 79 characters)
doc/source/io.rst:3865:4: E402 module level import not at top of file
doc/source/io.rst:3866:30: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3866:32: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3866:60: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3866:62: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3866:64: E201 whitespace after '['
doc/source/io.rst:3866:83: E501 line too long (140 > 79 characters)
doc/source/io.rst:3866:140: E202 whitespace before ']'
doc/source/io.rst:3950:45: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3950:47: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:3979:7: E111 indentation is not a multiple of four
doc/source/io.rst:4006:9: E111 indentation is not a multiple of four
doc/source/io.rst:4006:23: E226 missing whitespace around arithmetic operator
doc/source/io.rst:4011:9: E111 indentation is not a multiple of four
doc/source/io.rst:4108:38: E127 continuation line over-indented for visual indent
doc/source/io.rst:4113:66: E202 whitespace before '}'
doc/source/io.rst:4114:30: E127 continuation line over-indented for visual indent
doc/source/io.rst:4123:30: E127 continuation line over-indented for visual indent
doc/source/io.rst:4123:38: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:4123:40: E251 unexpected spaces around keyword / parameter equals
doc/source/io.rst:4162:46: E202 whitespace before ')'
doc/source/io.rst:4335:49: E202 whitespace before '}'
doc/source/io.rst:4349:4: E402 module level import not at top of file
doc/source/io.rst:4427:29: E127 continuation line over-indented for visual indent
doc/source/io.rst:4438:4: E402 module level import not at top of file
doc/source/io.rst:4526:4: E402 module level import not at top of file
doc/source/io.rst:4592:4: E402 module level import not at top of file
doc/source/io.rst:4676:4: E402 module level import not at top of file
doc/source/io.rst:4725:84: E501 line too long (85 > 79 characters)
doc/source/io.rst:4746:4: E402 module level import not at top of file
doc/source/io.rst:4805:4: E402 module level import not at top of file
doc/source/io.rst:4836:4: E402 module level import not at top of file
doc/source/io.rst:4838:36: E231 missing whitespace after ','
doc/source/io.rst:4838:39: E231 missing whitespace after ','
doc/source/io.rst:4839:4: E128 continuation line under-indented for visual indent
doc/source/io.rst:4839:31: E231 missing whitespace after ','
doc/source/io.rst:4839:34: E231 missing whitespace after ','
doc/source/io.rst:4840:4: E122 continuation line missing indentation or outdented
doc/source/io.rst:4840:31: E231 missing whitespace after ','
doc/source/io.rst:4840:34: E231 missing whitespace after ','
doc/source/io.rst:4842:8: E221 multiple spaces before operator
doc/source/io.rst:4873:5: E402 module level import not at top of file
doc/source/io.rst:5002:84: E501 line too long (81 > 79 characters)
doc/source/io.rst:5057:4: E402 module level import not at top of file
doc/source/io.rst:5067:8: E128 continuation line under-indented for visual indent
doc/source/io.rst:5074:65: E712 comparison to True should be 'if cond is True:' or 'if cond:'
doc/source/io.rst:5080:5: E402 module level import not at top of file
doc/source/io.rst:5242:4: E402 module level import not at top of file

After fixing this issue, the previous command should not report any error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions