@@ -575,7 +575,7 @@ the `flake8 <https://pypi.org/project/flake8>`_ tool
575575and report any stylistic errors in your code. Therefore, it is helpful before
576576submitting code to run the check yourself on the diff::
577577
578- git diff master -u -- "*.py" | flake8 --diff
578+ git diff upstream/ master -u -- "*.py" | flake8 --diff
579579
580580This command will catch any stylistic errors in your changes specifically, but
581581be beware it may not catch all of them. For example, if you delete the only
@@ -584,21 +584,21 @@ unused function. However, style-checking the diff will not catch this because
584584the actual import is not part of the diff. Thus, for completeness, you should
585585run this command, though it will take longer::
586586
587- git diff master --name-only -- "*.py" | grep "pandas/ " | xargs -r flake8
587+ git diff upstream/ master --name-only -- "*.py" | xargs -r flake8
588588
589589Note that on OSX, the ``-r `` flag is not available, so you have to omit it and
590590run this slightly modified command::
591591
592- git diff master --name-only -- "*.py" | grep "pandas/ " | xargs flake8
592+ git diff upstream/ master --name-only -- "*.py" | xargs flake8
593593
594- Windows does not support the ``grep `` and `` xargs `` commands (unless installed
595- for example via the `MinGW <http://www.mingw.org/ >`__ toolchain), but one can
596- imitate the behaviour as follows::
594+ Windows does not support the ``xargs `` command (unless installed for example
595+ via the `MinGW <http://www.mingw.org/ >`__ toolchain), but one can imitate the
596+ behaviour as follows::
597597
598- for /f %i in ('git diff upstream/master --name-only ^| findstr pandas/ ') do flake8 %i
598+ for /f %i in ('git diff upstream/master --name-only -- "*.py" ') do flake8 %i
599599
600- This will also get all the files being changed by the PR (and within the
601- `` pandas/ `` folder), and run ``flake8 `` on them one after the other.
600+ This will get all the files being changed by the PR (and ending with `` .py ``),
601+ and run ``flake8 `` on them, one after the other.
602602
603603.. _contributing.import-formatting :
604604
0 commit comments