Show More
@@ -0,0 +1,4 | |||||
|
1 | use pyo3::create_exception; | |||
|
2 | use pyo3::exceptions::PyValueError; | |||
|
3 | ||||
|
4 | create_exception!(pyo3_rustext, GraphError, PyValueError); |
@@ -1,6 +1,7 | |||||
1 | use pyo3::prelude::*; |
|
1 | use pyo3::prelude::*; | |
2 |
|
2 | |||
3 | mod dagops; |
|
3 | mod dagops; | |
|
4 | mod exceptions; | |||
4 | mod util; |
|
5 | mod util; | |
5 |
|
6 | |||
6 | #[pymodule] |
|
7 | #[pymodule] | |
@@ -15,5 +16,6 fn pyo3_rustext(py: Python<'_>, m: &Boun | |||||
15 | let dotted_name = format!("mercurial.{}", name); |
|
16 | let dotted_name = format!("mercurial.{}", name); | |
16 |
|
17 | |||
17 | m.add_submodule(&dagops::init_module(py, &dotted_name)?)?; |
|
18 | m.add_submodule(&dagops::init_module(py, &dotted_name)?)?; | |
|
19 | m.add("GraphError", py.get_type::<exceptions::GraphError>())?; | |||
18 | Ok(()) |
|
20 | Ok(()) | |
19 | } |
|
21 | } |
General Comments 0
You need to be logged in to leave comments.
Login now