File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -425,15 +425,15 @@ def is_using_venv() -> bool:
425
425
return result
426
426
427
427
428
- def is_in_virtualenv ():
428
+ def is_in_virtualenv () -> bool :
429
429
"""
430
430
Check virtualenv membership dynamically
431
431
432
- :return: True or false depending on whether we are in a regular virtualenv or not
432
+ :return: True or False depending on whether we are in a regular virtualenv or not
433
433
:rtype: bool
434
434
"""
435
435
436
- pipenv_active = os .environ .get ("PIPENV_ACTIVE" , False )
436
+ pipenv_active = os .environ .get ("PIPENV_ACTIVE" )
437
437
virtual_env = bool (os .environ .get ("VIRTUAL_ENV" ))
438
438
ignore_virtualenvs = bool (get_from_env ("IGNORE_VIRTUALENVS" ))
439
439
return virtual_env and not (pipenv_active or ignore_virtualenvs )
Original file line number Diff line number Diff line change @@ -143,8 +143,5 @@ def get_pip_args(
143
143
return list (dict .fromkeys (arg_set ))
144
144
145
145
146
- def get_trusted_hosts ():
147
- try :
148
- return os .environ .get ("PIP_TRUSTED_HOSTS" , []).split (" " )
149
- except AttributeError :
150
- return []
146
+ def get_trusted_hosts () -> List [str ]:
147
+ return os .environ .get ("PIP_TRUSTED_HOSTS" , "" ).split ()
You can’t perform that action at this time.
0 commit comments