(value: str | bytes, encoding: str = "utf-8")
| 81 | |
| 82 | |
| 83 | def to_str(value: str | bytes, encoding: str = class="st">"utf-8") -> str: |
| 84 | return value if isinstance(value, str) else value.decode(encoding) |
| 85 | |
| 86 | |
| 87 | def to_bytes_or_str(value: str, match_type_of: typing.AnyStr) -> typing.AnyStr: |
no test coverage detected