From 857753cca35187d56c8318d374f3ce9937711461 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 3 Dec 2023 15:56:50 +0700 Subject: [PATCH] add a correctly-named submodule --- Cargo.lock | 2 +- src/lib.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index f1c6d62..8916a4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,7 +88,7 @@ dependencies = [ [[package]] name = "pdoc-pyo3-sample-library" -version = "0.1.0" +version = "1.0.0" dependencies = [ "pyo3", ] diff --git a/src/lib.rs b/src/lib.rs index a51a57e..fd86ee1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,6 +19,10 @@ fn pdoc_pyo3_sample_library(py: Python<'_>, m: &PyModule) -> PyResult<()> { .getattr("modules")? .set_item("pdoc_pyo3_sample_library.explicit_submodule", explicit_submodule)?; + let correct_name_submodule = PyModule::new(py, "pdoc_pyo3_sample_library.correct_name_submodule")?; + correct_name_submodule.add_function(wrap_pyfunction!(func, correct_name_submodule)?)?; + m.add_submodule(correct_name_submodule)?; + Ok(()) }