(name)
| 542 | |
| 543 | # Just raise TypeError if the arg isn't None or a string. |
| 544 | def _check_tzname(name): |
| 545 | if name is not None and not isinstance(name, str): |
| 546 | raise TypeError("tzinfo.tzname() must return None or string, " |
| 547 | f"not {type(name).__name__!r}") |
| 548 | |
| 549 | # name is the offset-producing method, "utcoffset" or "dst". |
| 550 | # offset is what it returned. |