mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Comment and format
This commit is contained in:
+5
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user