fix `clippy-beta` ci workflow (#4147)

This commit is contained in:
Icxolu 2024-05-01 21:05:51 +02:00 committed by GitHub
parent a454f6e9cc
commit 9a808c35c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,8 @@ pub fn get() -> &'static InterpreterConfig {
.map(|path| path.exists())
.unwrap_or(false);
// CONFIG_FILE is generated in build.rs, so it's content can vary
#[allow(unknown_lints, clippy::const_is_empty)]
if let Some(interpreter_config) = InterpreterConfig::from_cargo_dep_env() {
interpreter_config
} else if !CONFIG_FILE.is_empty() {
@ -177,6 +179,8 @@ pub mod pyo3_build_script_impl {
/// correct value for CARGO_CFG_TARGET_OS).
#[cfg(feature = "resolve-config")]
pub fn resolve_interpreter_config() -> Result<InterpreterConfig> {
// CONFIG_FILE is generated in build.rs, so it's content can vary
#[allow(unknown_lints, clippy::const_is_empty)]
if !CONFIG_FILE.is_empty() {
let mut interperter_config = InterpreterConfig::from_reader(Cursor::new(CONFIG_FILE))?;
interperter_config.generate_import_libs()?;