Fix mypy strict equality
Ping @jdavid any comments/review to this PR?
Hi @kbaikov , sorry for the delay, have been busy.
- assert ObjectType.BLOB == blob.type
+ assert int(ObjectType.BLOB) == blob.type
The thing is ObjectType.BLOB == blob.type should work and this should be tested in the unit tests.
If we are to make strict_equality = True then blob.type should return ObjectType.BLOB instead of 3.
But this is likely difficult to do because blob.type is defined in C while ObjectType is defined in Python.
Hi @kbaikov , sorry for the delay, have been busy.
- assert ObjectType.BLOB == blob.type + assert int(ObjectType.BLOB) == blob.typeThe thing is
ObjectType.BLOB == blob.typeshould work and this should be tested in the unit tests.If we are to make
strict_equality = Truethenblob.typeshould returnObjectType.BLOBinstead of3. But this is likely difficult to do becauseblob.typeis defined in C whileObjectTypeis defined in Python.
Done.