From 42c13de834b23d1256ce2fdd15766c4528040e77 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Fri, 17 Mar 2017 01:21:04 -0400 Subject: [PATCH] DOC: Add gotcha about flake8-ing diff [ci skip] --- doc/source/contributing.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 83f99b4f01b26..7961780d0c79b 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -520,6 +520,15 @@ submitting code to run the check yourself on the diff:: git diff master | flake8 --diff +This command will catch any stylistic errors in your changes specifically, but +be beware it may not catch all of them. For example, if you delete the only +usage of an imported function, it is stylistically incorrect to import an +unused function. However, style-checking the diff will not catch this because +the actual import is not part of the diff. Thus, for completeness, you should +run this command, though it will take longer:: + + git diff master --name-only -- '*.py' | grep 'pandas' | xargs -r flake8 + Backwards Compatibility ~~~~~~~~~~~~~~~~~~~~~~~