DOC: more consistent flake8-commands in contributing.rst
State: closed

After #23707, I was looking at the rendered results in https://pandas-docs.github.io/pandas-docs-travis/contributing.html#id54, and noticed some inconsistencies:

* the linux commands use `git diff master` as opposed to `git diff upstream/master`; this is also in contrast to what's in the PR template
* the windows command does not match `.py` (because the command was getting long)
* we're already matching filenames directly as a parameter to `git`, which makes it redundant to pipe to `grep`.

This PR proposes to harmonize those things. Sorry I overlooked them in #23707.


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

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

```diff
@@           Coverage Diff           @@
##           master   #23724   +/-   ##
=======================================
  Coverage   92.25%   92.25%           
=======================================
  Files         161      161           
  Lines       51383    51383           
=======================================
  Hits        47404    47404           
  Misses       3979     3979
```

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

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23724?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.58% <0%> (ø)` | :arrow_up: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `83.63% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.87% <0%> (ø)` | :arrow_up: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.82% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.34% <0%> (ø)` | :arrow_up: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.4% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/23724/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `98.47% <0%> (ø)` | :arrow_up: |

------

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

Failure is due to #23726
@WillAyd 
> Rather than try to continually harmonize these can't we update the make rule and reference that instead?

AFAICT, the `make.py` is only for the docs (currently: https://pandas-docs.github.io/pandas-docs-travis/contributing.html#id49).

To me, these commands make sense to have, and it's not so much a continual harmonization, as a one-off (partly, but not only due to #23707, where I had focused more on just the windows side).
I'm not referring to `make.py` but rather the Makefile in the top level directory:

https://github.com/pandas-dev/pandas/blob/1250500cfe18f60cfb8a4867c82d14467bbee7ad/Makefile#L15
@WillAyd, well, that part isn't windows-compatible (at least not out-of-the-box) - no `make` command... It would be another thing to harmonize in this PR though, as the `grep` in there is useless, and it should compare to `upstream/master`.
Failure is just the rank segfault
thanks!