(input_object)
| 291 | |
| 292 | # pylint: disable=undefined-variable |
| 293 | def byteify(input_object): |
| 294 | if isinstance(input_object, dict): |
| 295 | return OrderedDict( |
| 296 | [(byteify(key), byteify(value)) for key, value in input_object.items()] |
| 297 | ) |
| 298 | if isinstance(input_object, list): |
| 299 | return [byteify(element) for element in input_object] |
| 300 | if isinstance(input_object, str): # noqa:F821 |
| 301 | return input_object.encode(encoding="utf-8") |
| 302 | return input_object |
| 303 | |
| 304 | |
| 305 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected
searching dependent graphs…