PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Other
11.47k stars 694 forks source link

fix clippy #4227

Open Icxolu opened 1 month ago

Icxolu commented 1 month ago

Currently I get clippy failures on the two runs with abi3 when running nox -s clippy on main locally. It looks like they originate from #3835. Looking at the feature flags, it seems correct to me that they trigger, but I'm not sure why CI (on main and PRs) does not seem to care...

davidhewitt commented 1 month ago

Thanks!

So I think the problem here is that CI runs the clippy-all job, which uses config files to fake the Python interpreter in order to lint all feature configurations.

The problem is that the config files also control the abi3 feature, and I recently realised in https://github.com/PyO3/pyo3/pull/4185#issuecomment-2113722396 that this also creates issues with test-debug. I suspect that our CI is a bit broken in both clippy-all and test-debug. :(

I'm not sure what the right solution is; I guess to some extent it requires adding additional complexity in pyo3-build-config...