Skip to content

Conversation

@wiktor-k
Copy link
Owner

@wiktor-k wiktor-k commented Oct 9, 2025

Currently this can be checked with the following command:

maturin develop && cargo run && maturin develop && mypy code.py

Currently it outputs the following errors:

$ mypy code.py
pysequoia.pyi:43: error: "__new__" must return a class instance (got "None")  [misc]
pysequoia.pyi:69: error: Argument 1 of "__eq__" is incompatible with supertype "builtins.object"; supertype defines the argument type as "object"  [override]
pysequoia.pyi:69: note: This violates the Liskov substitution principle
pysequoia.pyi:69: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
pysequoia.pyi:69: note: It is recommended for "__eq__" to work with arbitrary objects, for example:
pysequoia.pyi:69: note:     def __eq__(self, other: object) -> bool:
pysequoia.pyi:69: note:         if not isinstance(other, SignatureMode):
pysequoia.pyi:69: note:             return NotImplemented
pysequoia.pyi:69: note:         return <logic to compare two SignatureMode instances>
pysequoia.pyi:70: error: Argument 1 of "__ne__" is incompatible with supertype "builtins.object"; supertype defines the argument type as "object"  [override]
pysequoia.pyi:70: note: This violates the Liskov substitution principle
pysequoia.pyi:70: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
Found 3 errors in 1 file (checked 1 source file)

See: PyO3/pyo3#5137
Closes: #50

Currently this can be checked with the following command:

```sh
maturin develop && cargo run && maturin develop && mypy code.py
```

Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
@wiktor-k wiktor-k mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PySigner

2 participants