MCPcopy Create free account
hub / github.com/aws/aws-cli / _group_scalar_keys

Method _group_scalar_keys

awscli/formatter.py:314–327  ·  view source on GitHub ↗
(self, current)

Source from the content-addressed store, hash-verified

312 return headers, more
313
314 def _group_scalar_keys(self, current):
315 # Given a dict, separate the keys into those whose values are
316 # scalar, and those whose values aren't. Return two lists,
317 # one is the scalar value keys, the second is the remaining keys.
318 more = []
319 headers = []
320 for element in current:
321 if self._scalar_type(current[element]):
322 headers.append(element)
323 else:
324 more.append(element)
325 headers.sort()
326 more.sort()
327 return headers, more
328
329
330class TextFormatter(Formatter):

Callers 2

Calls 1

_scalar_typeMethod · 0.95

Tested by

no test coverage detected