File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ def send_no_reply(
9999 lambda : self ._connection ._send_message_to_server (
100100 self ._object ,
101101 method ,
102- _augment_params (params , timeout_calculator , filter = False ),
102+ _augment_params (params , timeout_calculator ),
103103 True ,
104104 ),
105105 is_internal ,
@@ -647,13 +647,12 @@ def _extract_stack_trace_information_from_stack(
647647def _augment_params (
648648 params : Optional [Dict ],
649649 timeout_calculator : Optional [Callable [[Optional [float ]], float ]],
650- filter : bool = True ,
651650) -> Dict :
652651 if params is None :
653652 params = {}
654653 if timeout_calculator :
655654 params ["timeout" ] = timeout_calculator (params .get ("timeout" ))
656- return _filter_none (params ) if filter else params
655+ return _filter_none (params )
657656
658657
659658def _filter_none (d : Mapping ) -> Dict :
@@ -663,7 +662,8 @@ def _filter_none(d: Mapping) -> Dict:
663662 continue
664663 elif isinstance (v , dict ):
665664 filtered_v = _filter_none (v )
666- if filtered_v :
665+ if filtered_v is not None :
666+ # Allow empty dicts/lists, but not None
667667 result [k ] = filtered_v
668668 else :
669669 result [k ] = v
You can’t perform that action at this time.
0 commit comments