Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Type Signatures from Nanobind #32

Open
jamesETsmith opened this issue Sep 23, 2024 · 1 comment
Open

Fixing Type Signatures from Nanobind #32

jamesETsmith opened this issue Sep 23, 2024 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jamesETsmith
Copy link
Contributor

General

There is sometimes a disconnect between the function signatures from nanobind that cause mypy to complain.

Details

Here's an example I saw recently, as of now, these have been crudely addressed by adding # type: ignore[...]

tests/fast_pauli/test_pauli_string.py:86: error: Argument 1 to "PauliString" has incompatible type "Sequence[Any]"; expected "str"  [arg-type]
tests/fast_pauli/test_pauli_string.py:99: error: Argument 1 to "PauliString" has incompatible type "Sequence[Any]"; expected "str"  [arg-type]
tests/fast_pauli/test_pauli_op.py:532: error: Unsupported operand types for + ("PauliString" and "PauliOp")  [operator]
tests/fast_pauli/test_pauli_op.py:532: note: Both left and right operands are unions
tests/fast_pauli/test_pauli_op.py:537: error: Unsupported operand types for + ("PauliString" and "PauliOp")  [operator]
tests/fast_pauli/test_pauli_op.py:537: note: Both left and right operands are unions
tests/fast_pauli/test_pauli_op.py:593: error: Unsupported operand types for + ("PauliString" and "PauliOp")  [operator]
tests/fast_pauli/test_pauli_op.py:593: note: Both left and right operands are unions
tests/fast_pauli/test_pauli_op.py:599: error: Unsupported operand types for - ("PauliString" and "PauliOp")  [operator]
tests/fast_pauli/test_pauli_op.py:599: note: Both left and right operands are unions
tests/fast_pauli/test_pauli_op.py:604: error: Unsupported operand types for + ("PauliString" and "PauliOp")  [operator]
tests/fast_pauli/test_pauli_op.py:604: note: Both left and right operands are unions
Found 7 errors in 2 files (checked 18 source files)
@jamesETsmith jamesETsmith added bug Something isn't working documentation Improvements or additions to documentation labels Sep 23, 2024
@jamesETsmith
Copy link
Contributor Author

We may have to do something like they outline in the nanobind docs here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant