From 06443e1dd4941e272d34ba5406df04a390a29a59 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 9 Sep 2024 12:09:32 +0000 Subject: [PATCH] libcst_native: add optional signature Newer versions of pyo3 warn about missing signatures --- native/libcst/src/py.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/native/libcst/src/py.rs b/native/libcst/src/py.rs index 963a71a8..bd7dfe6d 100644 --- a/native/libcst/src/py.rs +++ b/native/libcst/src/py.rs @@ -10,6 +10,7 @@ use pyo3::prelude::*; #[pyo3(name = "native")] pub fn libcst_native(_py: Python, m: &Bound) -> PyResult<()> { #[pyfn(m)] + #[pyo3(signature = (source, encoding=None))] fn parse_module(source: String, encoding: Option<&str>) -> PyResult { let m = crate::parse_module(source.as_str(), encoding)?; Python::with_gil(|py| m.try_into_py(py))