PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Apache License 2.0
12.41k stars 766 forks source link

new `wildcard_import` clippy warning from `#[pyclass]` on `main` #4701

Closed davidhewitt closed 1 week ago

davidhewitt commented 1 week ago

This code is failing clippy on main, is fine on 0.22.

#![deny(clippy::pedantic, clippy::all)]

#[pyo3::pymodule]
mod pyo3_scratch {
    use pyo3::prelude::*;

    #[pyclass]
    pub struct Foo {}
}
error: usage of wildcard import
 --> src/lib.rs:7:5
  |
7 |       #[pyclass]
  |       ^---------
  |       |
  |  _____in this procedural macro expansion
  | |
8 | |     pub struct Foo {}
  | |__________________^
  |

... it's probably another similar case to #4663