Skip to content

Commit 42c13de

Browse files
committed
DOC: Add gotcha about flake8-ing diff
[ci skip]
1 parent 61f6f63 commit 42c13de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/source/contributing.rst

+9
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,15 @@ submitting code to run the check yourself on the diff::
520520

521521
git diff master | flake8 --diff
522522

523+
This command will catch any stylistic errors in your changes specifically, but
524+
be beware it may not catch all of them. For example, if you delete the only
525+
usage of an imported function, it is stylistically incorrect to import an
526+
unused function. However, style-checking the diff will not catch this because
527+
the actual import is not part of the diff. Thus, for completeness, you should
528+
run this command, though it will take longer::
529+
530+
git diff master --name-only -- '*.py' | grep 'pandas' | xargs -r flake8
531+
523532
Backwards Compatibility
524533
~~~~~~~~~~~~~~~~~~~~~~~
525534

0 commit comments

Comments
 (0)