Adding local pip-review (#433)

This commit is contained in:
MonstrousOgre
2023-05-20 23:03:59 +05:30
committed by GitHub
parent f06b7c0807
commit 54301a6a17
4 changed files with 35 additions and 2 deletions

View File

@@ -130,6 +130,7 @@ pub enum Step {
Pearl,
Pip3,
PipReview,
PipReviewLocal,
Pipupgrade,
Pipx,
Pkg,
@@ -200,6 +201,7 @@ pub struct Windows {
#[serde(deny_unknown_fields)]
pub struct Python {
enable_pip_review: Option<bool>,
enable_pip_review_local: Option<bool>,
enable_pipupgrade: Option<bool>,
}
@@ -1138,6 +1140,14 @@ impl Config {
.and_then(|python| python.enable_pip_review)
.unwrap_or(false);
}
pub fn enable_pip_review_local(&self) -> bool {
return self
.config_file
.python
.as_ref()
.and_then(|python| python.enable_pip_review_local)
.unwrap_or(false);
}
pub fn display_time(&self) -> bool {
self.config_file.display_time.unwrap_or(true)