Merge branch 'issue/362' into 'master'

Lint only *.py files with --diff option

Closes #362

See merge request !206
This commit is contained in:
Ian Stapleton Cordasco 2017-08-08 12:40:27 +00:00
commit d5dfd1180d

View file

@ -209,6 +209,7 @@ class Manager(object):
filename_patterns = self.options.filename
running_from_vcs = self.options._running_from_vcs
running_from_diff = self.options.diff
# NOTE(sigmavirus24): Yes this is a little unsightly, but it's our
# best solution right now.
@ -227,6 +228,7 @@ class Manager(object):
# If it was specified explicitly, the user intended for it to be
# checked.
explicitly_provided = (not running_from_vcs and
not running_from_diff and
(argument == filename))
return ((file_exists and
(explicitly_provided or matches_filename_patterns)) or