fix `non_snake_case` lint for `#[pyfunction]` generated code

This commit is contained in:
David Hewitt 2023-02-28 08:44:17 +00:00
parent 794755c579
commit 7a2b1f0e13
3 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix `non_snake_case` lint fired by generated code in `#[pyfunction]` macro.

View File

@ -457,6 +457,7 @@ pub fn impl_wrap_pyfunction(
const DEF: #krate::impl_::pyfunction::PyMethodDef = #methoddef;
}
#[allow(non_snake_case)]
#wrapper
};
};

View File

@ -1545,7 +1545,6 @@ fn test_option_pyclass_arg() {
}
#[test]
#[allow(non_snake_case)] // FIXME __pyfunction__foo expanded symbol is not snake case
fn test_issue_2988() {
#[pyfunction]
#[pyo3(signature = (