File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1+ import ast
12import datetime
23import decimal
34import enum
45import math
56import re
67import types
78from typing import Any
8- import ast
9+
910import sentry_sdk
1011
1112from codeflash .cli_cmds .console import logger
@@ -61,6 +62,7 @@ def comparator(orig: Any, new: Any) -> bool:
6162 bool ,
6263 complex ,
6364 type (None ),
65+ type (Ellipsis ),
6466 decimal .Decimal ,
6567 set ,
6668 bytes ,
@@ -77,8 +79,6 @@ def comparator(orig: Any, new: Any) -> bool:
7779 return True
7880 return math .isclose (orig , new )
7981 if isinstance (orig , BaseException ):
80- # if str(orig) != str(new):
81- # return False
8282 # compare the attributes of the two exception objects to determine if they are equivalent.
8383 orig_dict = {k : v for k , v in orig .__dict__ .items () if not k .startswith ("_" )}
8484 new_dict = {k : v for k , v in new .__dict__ .items () if not k .startswith ("_" )}
@@ -205,8 +205,6 @@ def comparator(orig: Any, new: Any) -> bool:
205205 return new == orig
206206 if str (type (orig )) == "<class 'object'>" :
207207 return True
208- if orig is Ellipsis and new is Ellipsis :
209- return True
210208 # TODO : Add other types here
211209 logger .warning (f"Unknown comparator input type: { type (orig )} " )
212210 return False
You can’t perform that action at this time.
0 commit comments