Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e786db0

Browse files
committed
Print incorrect tz argument in error message
1 parent 75a35e0 commit e786db0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def _get_tzinfo(tz=None):
230230
return tzinfo
231231
if isinstance(tz, datetime.tzinfo):
232232
return tz
233-
raise TypeError("tz must be string or tzinfo subclass.")
233+
raise TypeError(f"tz must be string or tzinfo subclass, not {tz!r}.")
234234

235235

236236
# Time-related constants.

0 commit comments

Comments
 (0)