Skip to content

Commit

Permalink
Use isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Jan 18, 2024
1 parent a622767 commit f9b2516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linodecli/api_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _traverse_request_body(o: Any) -> Any:
value = _traverse_request_body(v)

# We should exclude implicit empty lists
if not (hasattr(value, "__len__") and len(value) < 1):
if not (isinstance(value, (dict, list)) and len(value) < 1):
result[k] = value

return result
Expand Down

0 comments on commit f9b2516

Please sign in to comment.