summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Stapleton Cordasco <graffatcolmingov@gmail.com>2018-04-15 23:33:40 +0000
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2018-04-15 23:33:40 +0000
commit52210149474a876c06922ae2c296445af5bdb108 (patch)
tree525b9a96434c238975bbda01a545c70e066b8e54 /src
parentf05c01b3ff79728a7f7a76105f08cf853c8546c3 (diff)
parent59218ca3232fe7e9c9fe9a949b8edb6f02b8ec10 (diff)
downloadflake8-52210149474a876c06922ae2c296445af5bdb108.tar.gz
Merge branch '405-nonexisting-files' into 'master'
Resolve "flake8 does not generate error when given a non-existent file on the command line" Closes #405 See merge request pycqa/flake8!227
Diffstat (limited to 'src')
-rw-r--r--src/flake8/checker.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flake8/checker.py b/src/flake8/checker.py
index 97c5ea1..b32fd3e 100644
--- a/src/flake8/checker.py
+++ b/src/flake8/checker.py
@@ -210,7 +210,6 @@ class Manager(object):
filename, filename_patterns
)
is_stdin = filename == '-'
- file_exists = os.path.exists(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
@@ -221,8 +220,7 @@ class Manager(object):
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
+ return ((explicitly_provided or matches_filename_patterns) or
is_stdin)
checks = self.checks.to_dictionary()