From ad9fb0f7e9dd7407091c2bd44ddff99d7d74a5c6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 25 May 2022 02:33:07 -0400 Subject: [PATCH] Make module deprecation messages consistent The default message already says more than enough over the manually created one. --- lib/matplotlib/afm.py | 4 +--- lib/matplotlib/fontconfig_pattern.py | 4 +--- lib/matplotlib/tight_bbox.py | 4 +--- lib/matplotlib/tight_layout.py | 4 +--- lib/matplotlib/type1font.py | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/matplotlib/afm.py b/lib/matplotlib/afm.py index c0b28604bd8c..d95c88a0e2b4 100644 --- a/lib/matplotlib/afm.py +++ b/lib/matplotlib/afm.py @@ -1,5 +1,3 @@ from matplotlib._afm import * # noqa: F401, F403 from matplotlib import _api -_api.warn_deprecated( - "3.6", message="The module %(name)s is deprecated since %(since)s.", - name=f"{__name__}") +_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/fontconfig_pattern.py b/lib/matplotlib/fontconfig_pattern.py index 353cdc8f5c43..94f0cb592708 100644 --- a/lib/matplotlib/fontconfig_pattern.py +++ b/lib/matplotlib/fontconfig_pattern.py @@ -1,5 +1,3 @@ from matplotlib._fontconfig_pattern import * # noqa: F401, F403 from matplotlib import _api -_api.warn_deprecated( - "3.6", message="The module %(name)s is deprecated since %(since)s.", - name=f"{__name__}") +_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/tight_bbox.py b/lib/matplotlib/tight_bbox.py index a87add58417f..88c4c1ec51af 100644 --- a/lib/matplotlib/tight_bbox.py +++ b/lib/matplotlib/tight_bbox.py @@ -1,5 +1,3 @@ from matplotlib._tight_bbox import * # noqa: F401, F403 from matplotlib import _api -_api.warn_deprecated( - "3.6", message="The module %(name)s is deprecated since %(since)s.", - name=f"{__name__}") +_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/tight_layout.py b/lib/matplotlib/tight_layout.py index 3cc7d32e352a..00a5c4b672aa 100644 --- a/lib/matplotlib/tight_layout.py +++ b/lib/matplotlib/tight_layout.py @@ -1,5 +1,3 @@ from matplotlib._tight_layout import * # noqa: F401, F403 from matplotlib import _api -_api.warn_deprecated( - "3.6", message="The module %(name)s is deprecated since %(since)s.", - name=f"{__name__}") +_api.warn_deprecated("3.6", name=__name__, obj_type="module") diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py index 5a9faa1c66d4..85d93c714dad 100644 --- a/lib/matplotlib/type1font.py +++ b/lib/matplotlib/type1font.py @@ -1,5 +1,3 @@ from matplotlib._type1font import * # noqa: F401, F403 from matplotlib import _api -_api.warn_deprecated( - "3.6", message="The module %(name)s is deprecated since %(since)s.", - name=f"{__name__}") +_api.warn_deprecated("3.6", name=__name__, obj_type="module")