PyO3 / pyo3

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

Declarative modules: submodule declarations are not considered covered #4286

Open alex opened 1 week ago

alex commented 1 week ago

From the coverage report on https://github.com/pyca/cryptography/pull/11159

Screenshot 2024-06-25 at 7 08 50 PM

As you can see the mod ... lines are all considered uncovered. This possibly has something to do with the spans on the generated code.

alex commented 6 days ago

I suspect, but am not positive, that this is because the __pyo3_init functions are generated for submodules, but obviously never called.

alex commented 6 days ago

Ok, my idea here is:

WDYT?