Comment and format

This commit is contained in:
Tzu-ping Chung
2018-07-01 19:20:36 +08:00
parent 9930d2edbb
commit f998d017e6
+5 -1
View File
@@ -1281,6 +1281,7 @@ def fs_str(string):
_fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
# Duplicated from Pew to avoid importing it (performance considerations).
def get_workon_home():
from ._compat import Path
workon_home = os.environ.get('WORKON_HOME')
@@ -1288,5 +1289,8 @@ def get_workon_home():
if os.name == 'nt':
workon_home = '~/.virtualenvs'
else:
workon_home = os.sep.join([os.environ.get('XDG_DATA_HOME', '~/.local/share'), 'virtualenvs'])
workon_home = os.path.join(
os.environ.get('XDG_DATA_HOME', '~/.local/share'),
'virtualenvs',
)
return Path(os.path.expandvars(workon_home)).expanduser()