Merge pull request #16 from codeflash-ai/saurabh/small-fixes-1

Some small fixes
This commit is contained in:
Saurabh Misra 2023-11-14 20:06:28 -08:00 committed by GitHub
commit 8e7de989b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -88,8 +88,11 @@ def comparator(orig: Any, new: Any) -> bool:
# If the object passed has a user defined __eq__ method, use that
# This could fail if the user defined __eq__ is defined with cython
if hasattr(orig, "__eq__") and str(type(orig.__eq__)) == "<class 'method'>":
return orig == new
try:
if hasattr(orig, "__eq__") and str(type(orig.__eq__)) == "<class 'method'>":
return orig == new
except Exception as e:
pass
# TODO : Add other types here
print("Unknown comparator input type: ", type(orig))