use pyo3::prelude::*;
#[pyclass]
struct MyClass {}
#[pymethods]
impl MyClass {
#[pyo3(name = "__truediv__")]
fn truediv_expects_one_argument(&self) -> PyResult<()> {
Ok(())
}
}
#[pymethods]
impl MyClass {
#[pyo3(name = "__truediv__")]
fn truediv_expects_one_argument_py(&self, _py: Python<'_>) -> PyResult<()> {
Ok(())
}
}
#[pymethods]
impl MyClass {
#[pyo3(name = "__bool__", signature = ())]
fn signature_is_forbidden(&self) -> bool {
true
}
}
#[pymethods]
impl MyClass {
#[pyo3(name = "__bool__", text_signature = "")]
fn text_signature_is_forbidden(&self) -> bool {
true
}
}
fn main() {}