DOC: Upgrade flake8-rst version
State: closed

closes #23508 

 - Update of `flake8-rst` version to >=0.6.0
 - Add files with issues to exclude




Labels:
name: Docs
name: Code Style
description: Code style, linting, code_checks
name: Clean

Comments:
Hello @FHaase! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`doc/source/conf.py`](https://github.com/FHaase/pandas/blob/7e8f3ff72e8aa1208be7dabfaccd5f2f9d043cea/doc/source/conf.py) !


There are several issues like #23790, #23791 and ##23794 that people is working on, and will conflict with this PR I think. If you can try to coordinate, so we avoid duplicating efforts...

Also, unless you expect the new `flake8-rst` release to be immediate, I'd ignore `F821`, so we can merge this fast, and we avoid conflicts.

Ping me when you get it sorted, and I'll review the changes.
@datapythonista I've reverted changes in `advanced.rst` and `cookbook.rst`. `io.rst` hasn't been touched but excluded from checks.

The PR's got merged a couple of hours ago so 0.6.0 is finally out. It has taken me some time but I think it's now usable and I'm going to open issues for the excluded files.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=h1) Report
> Merging [#23847](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b45eb265dd88648fb02ebb0fdcfb168364ab664e?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23847/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23847   +/-   ##
=======================================
  Coverage   42.46%   42.46%           
=======================================
  Files         161      161           
  Lines       51557    51557           
=======================================
  Hits        21892    21892           
  Misses      29665    29665
```

| Flag | Coverage Δ | |
|---|---|---|
| #single | `42.46% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=footer). Last update [b45eb26...b3d878d](https://codecov.io/gh/pandas-dev/pandas/pull/23847?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Nice. I surely reviewed the flake8 fixing in `cookbook.rst`, but I'm not sure about the other files. If you can check in the tickets if there has been some work, may be you can restore the fixes (or create new PRs for them).

Let me review the changes, but sounds great. Thanks!
I've seen the `cookbook.rst` fixes and that @YuechengWu is taking on `advanced.rst`. `io.rst` hasn't been touched by myself yet. And other issues/PRs haven't been created yet afaik.
`plt.figure()` and `plt.close('all')` doesn't make any difference in the generated pages.
There are no windows popping up during `python make.py html --single *`
So I've chosen to get rid of them. 

within `10min.rst` and `visualization.rst` I splitted all statements on seperate lines and suppressed not useful outputs like `<matplotlib.table.Table at 0x7efef9e37358>`.
Do you mind explaining again what's the reason for using different directives. Ideally for the code it'd be nice to just have `.. ipython:: python` blocks. I'm sure there are reasons for the other, but it's not obvious while reviewing why in come cases we use `.. ipython:: ipython` or `..code-block::pycon`.

Also, I'm sorry to ask this, but we need to split this PR. I understand for you it's easier to have everything in a single branch, and it's some extra work now that you already got the work done. But from a reviewers point to view, I'm sure other reviewers will have comments, and having all in the same place means that for even a single trivial change, we need to spend a lot of time reviewing the whole thing.

Would be nice to have the obvious pep8 fixes in a first PR, as they will be merged fast. And adding new dependencies, non trivial changes to the the directives (skipping certain rules...), the upgrade of flake8... in another. Now that you already got all the changes do what you can, and dividing by whole files it's perfectly fine. But for the next time, please consider the reviewing process when making the changes.

Thanks @FHaase 
@FHaase can you check the comments from the previous review?
@FHaase sorry to bother you with one more question. But regarding the blocks that break the syntax, and don't let the rest of the document be generated. Doesn't `flake8` skip the blocks marked as `:verbatim:`?

So, if you don't mind would be great to remove the inclusion of the sphinx extension for now, remove any file that can be removed from the list of ignores, merge master, and leave the CI green. So we can merge this, and continue the discussion while we work on the rest of the `.rst` pages.
> Doesn't flake8 skip the blocks marked as :verbatim:

flake8-rst doesn't skip those.


thanks @FHaase 

as followups would be great to remove .rst that already pass (you have done some PR's on this already)
Opened #24051 to remove the ignored files that have been fixed