summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-03-07 22:56:13 -0800
committerTimothy Crosley <timothy.crosley@gmail.com>2019-03-07 23:27:58 -0800
commit6a73db44c8bd4671b503be069a409d268efb10a2 (patch)
tree68625c6165c719c457c6a6b9fadc39312bd8b31e
parente1773beb351bdbeb6104ae0db4b58a65ce6c7299 (diff)
downloadisort-6a73db44c8bd4671b503be069a409d268efb10a2.tar.gz
Fix logic error in skip check
-rw-r--r--isort/isort.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/isort.py b/isort/isort.py
index 67cade39..646c9d0d 100644
--- a/isort/isort.py
+++ b/isort/isort.py
@@ -104,7 +104,7 @@ class SortImports(object):
print("WARNING: {0} was skipped as it's listed in 'skip' setting"
" or matches a glob in 'skip_glob' setting".format(file_path))
file_contents = None
- elif not file_contents:
+ if not self.skipped and not file_contents:
file_encoding = coding_check(file_path)
with open(file_path, encoding=file_encoding, newline='') as file_to_import_sort:
try: