简化依赖包
This commit is contained in:
@@ -47,22 +47,6 @@ class DependencyConfig:
|
||||
return config.dependency_management.mirror_url
|
||||
return ""
|
||||
|
||||
@property
|
||||
def use_proxy(self) -> bool:
|
||||
"""是否使用网络代理"""
|
||||
config = self._get_config()
|
||||
if config and hasattr(config, 'dependency_management'):
|
||||
return config.dependency_management.use_proxy
|
||||
return False
|
||||
|
||||
@property
|
||||
def proxy_url(self) -> str:
|
||||
"""网络代理URL"""
|
||||
config = self._get_config()
|
||||
if config and hasattr(config, 'dependency_management'):
|
||||
return config.dependency_management.proxy_url
|
||||
return ""
|
||||
|
||||
@property
|
||||
def install_timeout(self) -> int:
|
||||
"""安装超时时间(秒)"""
|
||||
@@ -71,17 +55,6 @@ class DependencyConfig:
|
||||
return config.dependency_management.auto_install_timeout
|
||||
return 300
|
||||
|
||||
@property
|
||||
def pip_options(self) -> list:
|
||||
"""pip安装选项"""
|
||||
config = self._get_config()
|
||||
if config and hasattr(config, 'dependency_management'):
|
||||
return config.dependency_management.pip_options
|
||||
return [
|
||||
"--no-warn-script-location",
|
||||
"--disable-pip-version-check"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user