Skip to content

Commit e0ac295

Browse files
committed
Remove ExplicitEmptyDictValue
1 parent 90515eb commit e0ac295

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

linodecli/api_request.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from linodecli.helpers import API_CA_PATH, API_VERSION_OVERRIDE
1919

2020
from .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

linodecli/baked/operation.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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
8478
class ExplicitJsonValue:
8579
"""

tests/unit/test_api_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
from linodecli import ExitCodes, api_request
1616
from 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
}

0 commit comments

Comments
 (0)