From e786db028c678f3c5c318318e68d9ade931f1a3b Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Thu, 9 Mar 2023 17:54:15 +0100 Subject: [PATCH] Print incorrect tz argument in error message --- lib/matplotlib/dates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 8f729bff7992..381dd810a5d2 100644 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -230,7 +230,7 @@ def _get_tzinfo(tz=None): return tzinfo if isinstance(tz, datetime.tzinfo): return tz - raise TypeError("tz must be string or tzinfo subclass.") + raise TypeError(f"tz must be string or tzinfo subclass, not {tz!r}.") # Time-related constants.