File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -591,21 +591,14 @@ run this slightly modified command::
591
591
592
592
git diff master --name-only -- "*.py" | grep "pandas/" | xargs flake8
593
593
594
- Note that on Windows, these commands are unfortunately not possible because
595
- commands like `` grep `` and `` xargs `` are not available natively. To imitate the
596
- behavior with the commands above, you should run ::
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 ::
597
597
598
- git diff master --name-only -- "*.py"
598
+ for /f %i in (' git diff upstream/ master --name-only ^| findstr pandas/') do flake8 %i
599
599
600
- This will list all of the Python files that have been modified. The only ones
601
- that matter during linting are any whose directory filepath begins with "pandas."
602
- For each filepath, copy and paste it after the ``flake8 `` command as shown below:
603
-
604
- flake8 <python-filepath>
605
-
606
- Alternatively, you can install the ``grep `` and ``xargs `` commands via the
607
- `MinGW <http://www.mingw.org/ >`__ toolchain, and it will allow you to run the
608
- commands above.
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.
609
602
610
603
.. _contributing.import-formatting :
611
604
You can’t perform that action at this time.
0 commit comments