Only force files to be included when run from CLI

Previously we added support so users can do:

    $ flake8 bin/executable

But this broke the fact that git hooks shouldn't check things like
reStructuredText doc files. This commit restores that functionality but
will cause bin/executable to be ignored in the git hook. This seems fair
since folks can amend their filename patterns to include it explicitly.

Closes #268
This commit is contained in:
Ian Cordasco 2016-11-23 16:36:26 -06:00
parent f8fbc11fad
commit e4582ef4e7
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
5 changed files with 34 additions and 15 deletions

View file

@ -3,7 +3,11 @@
You can view the `3.3.0 milestone`_ on GitLab for more details.
- Fix problem where hooks should only check \*.py files. (See also
`GitLab#268`_)
.. links
.. _3.3.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/16
.. _GitLab#268:
https://gitlab.com/pycqa/flake8/issues/268