File tree Expand file tree Collapse file tree 3 files changed +2
-13
lines changed
Expand file tree Collapse file tree 3 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 1818from linodecli .helpers import API_CA_PATH , API_VERSION_OVERRIDE
1919
2020from .baked .operation import (
21- ExplicitEmptyDictValue ,
2221 ExplicitEmptyListValue ,
2322 ExplicitJsonValue ,
2423 ExplicitNullValue ,
@@ -315,10 +314,6 @@ def _traverse_request_body(o: Any) -> Any:
315314 result [k ] = []
316315 continue
317316
318- if isinstance (v , ExplicitEmptyDictValue ):
319- result [k ] = {}
320- continue
321-
322317 if isinstance (v , ExplicitNullValue ):
323318 result [k ] = None
324319 continue
Original file line number Diff line number Diff line change @@ -74,12 +74,6 @@ class ExplicitEmptyListValue:
7474 """
7575
7676
77- class ExplicitEmptyDictValue :
78- """
79- A special type used to explicitly pass empty dictionaries to the API.
80- """
81-
82-
8377@dataclass
8478class ExplicitJsonValue :
8579 """
Original file line number Diff line number Diff line change 1414
1515from linodecli import ExitCodes , api_request
1616from linodecli .baked .operation import (
17- ExplicitEmptyDictValue ,
1817 ExplicitEmptyListValue ,
18+ ExplicitJsonValue ,
1919 ExplicitNullValue ,
2020)
2121
@@ -667,7 +667,7 @@ def test_traverse_request_body(self):
667667 "baz" : ExplicitNullValue (),
668668 },
669669 "cool" : [],
670- "pretty_cool" : ExplicitEmptyDictValue ( ),
670+ "pretty_cool" : ExplicitJsonValue ( json_value = {} ),
671671 "cooler" : ExplicitEmptyListValue (),
672672 "coolest" : ExplicitNullValue (),
673673 }
You can’t perform that action at this time.
0 commit comments