Merge pull request #16 from codeflash-ai/saurabh/small-fixes-1
Some small fixes
This commit is contained in:
commit
8e7de989b3
3 changed files with 5 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue