FIX: Forbid unwrap, expect and panic in the base code

This commit is contained in:
Nicolás Hatcher
2024-11-16 14:18:12 +01:00
committed by Nicolás Hatcher Andrés
parent bdd2c8fe04
commit 49ae2d8915
43 changed files with 341 additions and 128 deletions

View File

@@ -19,6 +19,3 @@ pyo3 = { version = "0.22.3", features = ["extension-module"] }
[features]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
[tool.maturin]
features = ["pyo3/extension-module"]

View File

@@ -208,6 +208,7 @@ impl PyModel {
.map_err(|e| WorkbookError::new_err(e.to_string()))
}
#[allow(clippy::panic)]
pub fn test_panic(&self) -> PyResult<()> {
panic!("This function panics for testing panic handling");
}
@@ -240,6 +241,7 @@ pub fn create(name: &str, locale: &str, tz: &str) -> PyResult<PyModel> {
}
#[pyfunction]
#[allow(clippy::panic)]
pub fn test_panic() {
panic!("This function panics for testing panic handling");
}