(value: str | bytes, encoding: str = "utf-8")
| 77 | |
| 78 | |
| 79 | def to_bytes(value: str | bytes, encoding: str = class="st">"utf-8") -> bytes: |
| 80 | return value.encode(encoding) if isinstance(value, str) else value |
| 81 | |
| 82 | |
| 83 | def to_str(value: str | bytes, encoding: str = class="st">"utf-8") -> str: |
no outgoing calls
no test coverage detected