2022-10-25 06:23:21 +00:00
|
|
|
error: missing signature entry for argument `_x`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:5:8
|
|
|
|
|
|
|
|
|
5 | #[pyo3(signature = ())]
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: signature entry does not have a corresponding function argument
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:9:21
|
|
|
|
|
|
|
|
|
9 | #[pyo3(signature = (x))]
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: expected argument from function definition `y` but got argument `x`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:13:21
|
|
|
|
|
|
|
|
|
13 | #[pyo3(signature = (x))]
|
|
|
|
| ^
|
|
|
|
|
2023-06-13 07:19:43 +00:00
|
|
|
error: expected one of: `name`, `pass_module`, `signature`, `text_signature`, `crate`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:18:14
|
2022-10-25 06:23:21 +00:00
|
|
|
|
|
2023-06-13 07:19:43 +00:00
|
|
|
18 | #[pyfunction(x)]
|
|
|
|
| ^
|
2022-10-25 06:23:21 +00:00
|
|
|
|
|
|
|
error: `*args` not allowed after `*`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:25:24
|
|
|
|
|
|
|
|
|
25 | #[pyo3(signature = (*, *args))]
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: `*` not allowed after `*`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:31:24
|
|
|
|
|
|
|
|
|
31 | #[pyo3(signature = (*, *))]
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: `*args` not allowed after `**kwargs`
|
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:35:31
|
|
|
|
|
|
|
|
|
35 | #[pyo3(signature = (**kwargs, *args))]
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: `**kwargs_b` not allowed after `**kwargs_a`
|
2024-05-03 07:42:30 +00:00
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:42:33
|
2022-10-25 06:23:21 +00:00
|
|
|
|
|
2024-05-03 07:42:30 +00:00
|
|
|
42 | #[pyo3(signature = (**kwargs_a, **kwargs_b))]
|
2022-10-25 06:23:21 +00:00
|
|
|
| ^
|
|
|
|
|
2023-02-03 06:54:54 +00:00
|
|
|
error: arguments of type `Python` must not be part of the signature
|
2024-05-03 07:42:30 +00:00
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:48:27
|
2023-02-03 06:54:54 +00:00
|
|
|
|
|
2024-05-03 07:42:30 +00:00
|
|
|
48 | #[pyfunction(signature = (py))]
|
2023-02-03 06:54:54 +00:00
|
|
|
| ^^
|
|
|
|
|
2023-06-13 07:19:43 +00:00
|
|
|
error: cannot find attribute `args` in this scope
|
2024-05-03 07:42:30 +00:00
|
|
|
--> tests/ui/invalid_pyfunction_signatures.rs:58:7
|
2022-10-25 06:23:21 +00:00
|
|
|
|
|
2024-05-03 07:42:30 +00:00
|
|
|
58 | #[args(x)]
|
2023-06-13 07:19:43 +00:00
|
|
|
| ^^^^
|