Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Aug 15, 2024
1 parent a7d461d commit 024bcd6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
6 changes: 5 additions & 1 deletion pineappl_py/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ impl PyBinRemapper {
pub fn register(parent_module: &Bound<'_, PyModule>) -> PyResult<()> {
let m = PyModule::new_bound(parent_module.py(), "bin")?;
m.setattr(pyo3::intern!(m.py(), "__doc__"), "Binning interface.")?;
pyo3::py_run!(parent_module.py(), m, "import sys; sys.modules['pineappl.bin'] = m");
pyo3::py_run!(
parent_module.py(),
m,
"import sys; sys.modules['pineappl.bin'] = m"
);
m.add_class::<PyBinRemapper>()?;
parent_module.add_submodule(&m)
}
6 changes: 5 additions & 1 deletion pineappl_py/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ impl PyChannel {
pub fn register(parent_module: &Bound<'_, PyModule>) -> PyResult<()> {
let m = PyModule::new_bound(parent_module.py(), "channel")?;
m.setattr(pyo3::intern!(m.py(), "__doc__"), "Channel interface.")?;
pyo3::py_run!(parent_module.py(), m, "import sys; sys.modules['pineappl.channel'] = m");
pyo3::py_run!(
parent_module.py(),
m,
"import sys; sys.modules['pineappl.channel'] = m"
);
m.add_class::<PyChannel>()?;
parent_module.add_submodule(&m)
}
6 changes: 5 additions & 1 deletion pineappl_py/src/evolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ impl PyEvolveInfo {
pub fn register(parent_module: &Bound<'_, PyModule>) -> PyResult<()> {
let m = PyModule::new_bound(parent_module.py(), "evolution")?;
m.setattr(pyo3::intern!(m.py(), "__doc__"), "Evolution interface.")?;
pyo3::py_run!(parent_module.py(), m, "import sys; sys.modules['pineappl.evolution'] = m");
pyo3::py_run!(
parent_module.py(),
m,
"import sys; sys.modules['pineappl.evolution'] = m"
);
m.add_class::<PyEvolveInfo>()?;
m.add_class::<PyOperatorSliceInfo>()?;
m.add_class::<PyPidBasis>()?;
Expand Down
11 changes: 9 additions & 2 deletions pineappl_py/src/import_only_subgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,15 @@ impl PyImportOnlySubgridV1 {
/// Register submodule in parent.
pub fn register(parent_module: &Bound<'_, PyModule>) -> PyResult<()> {
let m = PyModule::new_bound(parent_module.py(), "import_only_subgrid")?;
m.setattr(pyo3::intern!(m.py(), "__doc__"), "ImportOnlySubgrid* interface.")?;
pyo3::py_run!(parent_module.py(), m, "import sys; sys.modules['pineappl.import_only_subgrid'] = m");
m.setattr(
pyo3::intern!(m.py(), "__doc__"),
"ImportOnlySubgrid* interface.",
)?;
pyo3::py_run!(
parent_module.py(),
m,
"import sys; sys.modules['pineappl.import_only_subgrid'] = m"
);
m.add_class::<PyImportOnlySubgridV1>()?;
m.add_class::<PyImportOnlySubgridV2>()?;
parent_module.add_submodule(&m)
Expand Down

0 comments on commit 024bcd6

Please sign in to comment.