2993: fix `non_snake_case` lint for `#[pyfunction]` generated code r=davidhewitt a=davidhewitt

As promised in #2990 

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
bors[bot] 2023-02-28 08:49:13 +00:00 committed by GitHub
commit c28edd0a81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 = (