DOC: Fix flake8 issues in whatsnew v10* and v11*
State: closed

closes #24258 
closes #24259 
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=h1) Report
> Merging [#24277](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d43ac979fdf3038c713de93c7b27b4140be6c9c5?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/24277/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24277   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         162      162           
  Lines       51789    51789           
=======================================
  Hits        47762    47762           
  Misses       4027     4027
```

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


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24277?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/24277?src=pr&el=footer). Last update [d43ac97...3cd4a27](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=h1) Report
> Merging [#24277](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/040f06f731a09fc6e0663cada6697f6602b36f1d?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/24277/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24277   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         162      162           
  Lines       51828    51828           
=======================================
  Hits        47798    47798           
  Misses       4030     4030
```

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


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24277?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/24277?src=pr&el=footer). Last update [040f06f...1ed46ec](https://codecov.io/gh/pandas-dev/pandas/pull/24277?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I did not understand the reason for the failure. Can you point me to any document on how to debug? 
Seems unrelated to your changes, didn't check in detail, but I guess it's a test that fails randomly sometimes. Can you merge master and push again, so the CI reruns.
thanks @saurav2608