diff options
| author | Avraham Shukron <avraham.shukron@gmail.com> | 2018-02-21 18:19:59 +0200 |
|---|---|---|
| committer | Avraham Shukron <avraham.shukron@gmail.com> | 2018-02-21 18:19:59 +0200 |
| commit | 59218ca3232fe7e9c9fe9a949b8edb6f02b8ec10 (patch) | |
| tree | 5f69c2b2988833b7df7ddc54e3668f5b5efc248f /src | |
| parent | f8344997267b8ca87a96c690a3515a443005b653 (diff) | |
| download | flake8-59218ca3232fe7e9c9fe9a949b8edb6f02b8ec10.tar.gz | |
Report error when non-exiting path is passed to flake8
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/checker.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flake8/checker.py b/src/flake8/checker.py index 7a18ce5..44bd64e 100644 --- a/src/flake8/checker.py +++ b/src/flake8/checker.py @@ -219,7 +219,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 @@ -230,8 +229,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() |
