Verified Commit 1d577d47 authored by Mateusz Żebrak's avatar Mateusz Żebrak
Browse files

Fix typing of 'other' parameter in __eq__ method of KeyBase class

Fixes mypy error:
package/test_tools/__private/keys/key_base.py:34: error: Argument 1 of "__eq__" is incompatible with supertype "object"; supertype defines the argument type as "object"
package/test_tools/__private/keys/key_base.py:34: note: This violates the Liskov substitution principle
package/test_tools/__private/keys/key_base.py:34: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
package/test_tools/__private/keys/key_base.py:34: note: It is recommended for "__eq__" to work with arbitrary objects, for example:
package/test_tools/__private/keys/key_base.py:34: note:     def __eq__(self, other: object) -> bool:
package/test_tools/__private/keys/key_base.py:34: note:         if not isinstance(other, KeyBase):
package/test_tools/__private/keys/key_base.py:34: note:             return NotImplemented
package/test_tools/__private/keys/key_base.py:34: note:         return <logic to compare two KeyBase instances>
parent 43a58ca4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment