diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-28 01:09:22 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-28 01:09:22 -0800 |
commit | f8558269ff4291f3f49b4b35cc4cfc06f5514cee (patch) | |
tree | 9f43bf787c3a734137ad1328f14ec0c43d12159a | |
parent | 057643900ceddd96ce4f8bff07a40c712b765f46 (diff) | |
download | isort-f8558269ff4291f3f49b4b35cc4cfc06f5514cee.tar.gz |
Try using norm path
-rw-r--r-- | isort/settings.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/isort/settings.py b/isort/settings.py index 78ed9975..2fb0c9bd 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -318,6 +318,7 @@ def _get_config_data(file_path, sections): def should_skip(filename, config, path='/'): """Returns True if the file should be skipped based on the passed in settings.""" normalized_path = posixpath.join(path.replace('\\', '/'), filename) + os_path = os.path.normpath(normalized_path) if config['safety_excludes'] and safety_exclude_re.search(normalized_path): return True @@ -336,7 +337,7 @@ def should_skip(filename, config, path='/'): if fnmatch.fnmatch(filename, glob): return True - if not (os.path.isfile(filename) or os.path.isdir(filename) or os.path.islink(filename)): + if not (os.path.isfile(os_path) or os.path.isdir(os_path) or os.path.islink(os_path)): return True return False |