Helper function to return an error message related to invalid length.
(addr: str, limit: int)
| 199 | |
| 200 | |
| 201 | def get_length_reason(addr: str, limit: int) -> str: |
| 202 | """Helper function to return an error message related to invalid length.""" |
| 203 | diff = len(addr) - limit |
| 204 | suffix = "s" if diff > 1 else "" |
| 205 | return f"({diff} character{suffix} too many)" |
| 206 | |
| 207 | |
| 208 | def safe_character_display(c: str) -> str: |
no outgoing calls
no test coverage detected