reverted the change to accept only keywords arguments and have user and password as mandatory.

This commit is contained in:
cschen 2024-10-16 16:46:41 +02:00
parent 3d12840459
commit 22cec4ab56

View file

@ -174,7 +174,7 @@ impl User {
fn get_name(&self) -> pyo3::PyResult<String> { fn get_name(&self) -> pyo3::PyResult<String> {
Ok(self.name.clone()) Ok(self.name.clone())
} }
#[setter] #[setter]
fn set_name(&mut self, value: String) -> pyo3::PyResult<()> { fn set_name(&mut self, value: String) -> pyo3::PyResult<()> {
self.name = value; self.name = value;
@ -189,7 +189,7 @@ impl User {
#[pymethods] #[pymethods]
impl Config { impl Config {
#[new] #[new]
#[pyo3(signature = (username, password, **kwds))] #[pyo3(signature = (*, username, password, **kwds))]
pub fn pynew( pub fn pynew(
username: String, username: String,
password: String, password: String,