(
&self,
module: &Py<PyModule>,
attr_name: &'static PyStrInterned,
attr_value: impl Into<PyObjectRef>,
)
| 2182 | |
| 2183 | #[doc(hidden)] |
| 2184 | pub fn __module_set_attr( |
| 2185 | &self, |
| 2186 | module: &Py<PyModule>, |
| 2187 | attr_name: &'static PyStrInterned, |
| 2188 | attr_value: impl Into<PyObjectRef>, |
| 2189 | ) -> PyResult<()> { |
| 2190 | let val = attr_value.into(); |
| 2191 | module |
| 2192 | .as_object() |
| 2193 | .generic_setattr(attr_name, PySetterValue::Assign(val), self) |
| 2194 | } |
| 2195 | |
| 2196 | pub fn insert_sys_path(&self, obj: PyObjectRef) -> PyResult<()> { |
| 2197 | let sys_path = self.sys_module.get_attr("path", self).unwrap(); |
no test coverage detected