Skip to content

Commit

Permalink
Fixed some lints and fixed some missed pyo3 decorator changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsleap committed Oct 25, 2024
1 parent 470f084 commit c07e9b9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/correlator_context/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ use numpy::PyArray2;
#[cfg(feature = "python")]
use numpy::PyArray3;
#[cfg(feature = "python")]
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pymethods;

#[cfg_attr(feature = "python", gen_stub_pymethods)]
Expand Down
2 changes: 0 additions & 2 deletions src/metafits_context/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#[cfg(feature = "python")]
use super::*;
#[cfg(feature = "python")]
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pymethods;

#[cfg_attr(feature = "python", gen_stub_pymethods)]
Expand Down
7 changes: 3 additions & 4 deletions src/rfinput/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use error::RfinputError;
use std::fmt;

#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pyclass;
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pyclass_enum;
use pyo3_stub_gen_derive::{gen_stub_pyclass, gen_stub_pyclass_enum};

#[cfg(test)]
mod test;
Expand Down Expand Up @@ -255,8 +255,7 @@ struct RfInputMetafitsCalibDataTableRow {
}

/// Structure for storing MWA rf_chains (tile with polarisation) information from the metafits file
#[cfg_attr(feature = "python", gen_stub_pyclass)]
#[cfg_attr(feature = "python", pyo3::pyclass(get_all, set_all))]
#[cfg_attr(feature = "python", gen_stub_pyclass, pyclass(get_all, set_all))]
#[derive(Clone)]
pub struct Rfinput {
/// This is the metafits order (0-n inputs)
Expand Down
5 changes: 3 additions & 2 deletions src/signal_chain_correction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ use crate::rfinput::ReceiverType;
use crate::MAX_RECEIVER_CHANNELS;
use std::fmt;

#[cfg(feature = "python")]
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pyclass;

///
/// Signal chain correction table
///
#[cfg_attr(feature = "python", gen_stub_pyclass)]
#[cfg_attr(feature = "python", pyo3::pyclass(get_all, set_all))]
#[cfg_attr(feature = "python", gen_stub_pyclass, pyclass(get_all, set_all))]
#[derive(Clone, Debug, PartialEq)]
#[repr(C)]
pub struct SignalChainCorrection {
Expand Down
2 changes: 0 additions & 2 deletions src/voltage_context/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use ndarray::Dim;
#[cfg(feature = "python")]
use numpy::PyArray;
#[cfg(feature = "python")]
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3_stub_gen_derive::gen_stub_pymethods;

#[cfg_attr(feature = "python", gen_stub_pymethods)]
Expand Down

0 comments on commit c07e9b9

Please sign in to comment.