diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9281c51059087..959858fb50f89 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ - [ ] closes #xxxx - [ ] tests added / passed - - [ ] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff`` + - [ ] passes ``git diff upstream/master --name-only -- '*.py' | flake8 --diff`` (On Windows, ``git diff upstream/master -u -- "*.py" | flake8 --diff`` might work as an alternative.) - [ ] whatsnew entry diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index aacfe25b91564..67d3c2c515f6f 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -525,6 +525,11 @@ run this slightly modified command:: git diff master --name-only -- '*.py' | grep 'pandas/' | xargs flake8 +Note that on Windows, `grep`, `xargs`, and other tools are likely unavailable. +However, this has been shown to work on smaller commits:: + + git diff master -u -- "*.py" | flake8 --diff + Backwards Compatibility ~~~~~~~~~~~~~~~~~~~~~~~