Open NiklasVousten opened 2 months ago
The pipeline is now failing with the same clippy issues as the last commit on main.
So I assume all issues on my side are fixed
Attention: Patch coverage is 89.65517%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 66.73%. Comparing base (
cd5f278
) to head (149c0c7
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
pyo3_bindgen_engine/src/syntax/function.rs | 89.65% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Also, the tooling/test suite in the repository is generally lacking. Maybe you already found something better, but this helped me debug specific cases (not optimal, yet better than what is included...).
pyo3_bindgen_engine/src/lib.rs
:mod test;
rm ./pyo3_bindgen_engine/src/test.rs
touch ./pyo3_bindgen_engine/src/test.rs
cargo run -- -m <decently_complex_python_module> -o ./pyo3_bindgen_engine/src/test.rs
cargo fmt
cargo check
The rust function signature did not allow default values. Instead the user had to know these values to fill them in.
Every paramter, that has a default value, will now be wrapped inside an option. A user can this then set to None. If this option is None, it will be excluded from the kwargs dict, and thus the default value will be used.
Furthermore, the Optional Value from typing is excluded.
I am not sure if everything was done correctly and every occurence was changed. There might be edge cases where this will break, however on the tested examples this worked fine.