Remove `if if` (#12892)

Artifact from a clippy fix.
This commit is contained in:
konsti 2025-04-15 11:16:00 +02:00 committed by GitHub
parent ff566a5006
commit 30361e59c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 8 deletions

View File

@ -962,14 +962,10 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
// If `--system-site-packages` is enabled, add the system site packages to the ephemeral
// environment.
if if base_interpreter.is_virtualenv() {
{
PyVenvConfiguration::parse(base_interpreter.sys_prefix().join("pyvenv.cfg"))
if base_interpreter.is_virtualenv()
&& PyVenvConfiguration::parse(base_interpreter.sys_prefix().join("pyvenv.cfg"))
.is_ok_and(|cfg| cfg.include_system_site_packages())
}
} else {
false
} {
{
ephemeral_env.set_system_site_packages()?;
} else {
ephemeral_env.clear_system_site_packages()?;