diff options
author | Brian May <brian@linuxpenguins.xyz> | 2019-03-05 12:33:14 +1100 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2019-03-05 12:34:46 +1100 |
commit | 7834801b86908974c4acfb81e76b450b268b6551 (patch) | |
tree | 229aa38b3e3905867271b044f403236cb8a235d5 | |
parent | 1ec68ab8deab283f17bf7a39f011d18f02ad452a (diff) | |
download | isort-7834801b86908974c4acfb81e76b450b268b6551.tar.gz |
Lookup real path of virtualenv
This ensures we don't get confused and incorrectly classify third party
libraries as first party libraries.
Fixes #876.
-rw-r--r-- | isort/finders.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/isort/finders.py b/isort/finders.py index c419bec8..6a1c3d5a 100644 --- a/isort/finders.py +++ b/isort/finders.py @@ -140,6 +140,7 @@ class PathFinder(BaseFinder): # virtual env self.virtual_env = self.config.get('virtual_env') or os.environ.get('VIRTUAL_ENV') + self.virtual_env = os.path.realpath(self.virtual_env) self.virtual_env_src = False if self.virtual_env: self.virtual_env_src = '{0}/src/'.format(self.virtual_env) |