From 418ad8ee33cef6e76917ebe47d93717454cdf7ef Mon Sep 17 00:00:00 2001 From: Damien-Chen Date: Thu, 22 Aug 2024 22:46:45 +0800 Subject: [PATCH 1/2] Adding hyperlink of argument --- Doc/library/warnings.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index 68b9ff5ce2f78c..635622b2cd49cf 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -588,6 +588,9 @@ Available Context Managers Each object in the list has attributes with the same names as the arguments to :func:`showwarning`. + The definition of *category* and *lineno* are same as defined + at the top of :ref:`warning-filter` field. + The *module* argument takes a module that will be used instead of the module returned when you import :mod:`warnings` whose filter will be protected. This argument exists primarily for testing the :mod:`warnings` From eaa491ebdc7ee7d13383170e065de84aa3a60656 Mon Sep 17 00:00:00 2001 From: Damien-Chen Date: Thu, 22 Aug 2024 23:04:17 +0800 Subject: [PATCH 2/2] Modify as reviewer suggested --- Doc/library/warnings.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index 635622b2cd49cf..5ea65cbd8ca94c 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -588,9 +588,6 @@ Available Context Managers Each object in the list has attributes with the same names as the arguments to :func:`showwarning`. - The definition of *category* and *lineno* are same as defined - at the top of :ref:`warning-filter` field. - The *module* argument takes a module that will be used instead of the module returned when you import :mod:`warnings` whose filter will be protected. This argument exists primarily for testing the :mod:`warnings` @@ -600,6 +597,9 @@ Available Context Managers passed to :func:`simplefilter` as if it were called immediately on entering the context. + See :ref:`warning-filter` for the meaning of the *category* and *lineno* + parameters. + .. note:: The :class:`catch_warnings` manager works by replacing and