refactor(py): update the type stubs (and expose DType)

This commit is contained in:
Anand Balakrishnan 2023-05-04 13:33:56 -07:00
parent 9b07df440b
commit 31c65a4734
No known key found for this signature in database
10 changed files with 102 additions and 56 deletions

View file

@ -3,20 +3,12 @@ use std::time::Duration;
use argus_core::signals::{InterpolationMethod, Signal};
use pyo3::prelude::*;
use crate::PyArgusError;
#[derive(Copy, Clone, Debug)]
pub enum Kind {
Bool,
Int,
UnsignedInt,
Float,
}
use crate::{DType, PyArgusError};
#[pyclass(name = "Signal", subclass, module = "argus")]
#[derive(Debug, Clone)]
pub struct PySignal {
pub kind: Kind,
pub kind: DType,
pub interpolation: InterpolationMethod,
}
@ -32,7 +24,7 @@ macro_rules! impl_signals {
pub fn super_type() -> PySignal {
PySignal {
interpolation: InterpolationMethod::Linear,
kind: Kind::$ty_name,
kind: DType::$ty_name,
}
}
}