File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,11 @@ def find(self, datum):
104104 found = []
105105 for data in datum :
106106 value = data .value
107- if isinstance (self .value , int ) :
107+ if type (self .value ) is int :
108108 try :
109109 value = int (value )
110110 except ValueError :
111111 continue
112- elif isinstance (self .value , bool ):
113- try :
114- value = bool (value )
115- except ValueError :
116- continue
117112
118113 if OPERATOR_MAP [self .op ](value , self .value ):
119114 found .append (data )
Original file line number Diff line number Diff line change 484484 ["green" ],
485485 id = "boolean-filter-string-true-string-literal" ,
486486 ),
487+ pytest .param (
488+ "foo[?flag = true].color" ,
489+ {
490+ "foo" : [
491+ {"color" : "blue" , "flag" : True },
492+ {"color" : "green" , "flag" : 2 },
493+ {"color" : "red" , "flag" : "hi" },
494+ {"color" : "gray" , "flag" : None },
495+ ]
496+ },
497+ ["blue" ],
498+ id = "boolean-filter-with-null" ,
499+ ),
487500)
488501
489502
You can’t perform that action at this time.
0 commit comments