summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flake8/checker.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index b4e22b2..cf25117 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -275,7 +275,14 @@ class Manager(object):
for argument in paths
for filename in utils.filenames_from(argument,
self.is_path_excluded)
- if should_create_file_checker(filename)
+ # NOTE(sigmavirus24): If a user explicitly specifies something,
+ # e.g, ``flake8 bin/script`` then we should run Flake8 against
+ # that. Since should_create_file_checker looks to see if the
+ # filename patterns match the filename, we want to skip that in
+ # the event that the argument and the filename are identical.
+ # If it was specified explicitly, the user intended for it to be
+ # checked.
+ if argument == filename or should_create_file_checker(filename)
]
LOG.info('Checking %d files', len(self.checkers))