Skip to content

Commit d0f5bb0

Browse files
authored
Merge branch 'main' into static-bltin-__module__-115231
2 parents d1650bf + 10eeec2 commit d0f5bb0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Doc/library/warnings.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,19 @@ If a warning is reported and doesn't match any registered filter then the
180180
"default" action is applied (hence its name).
181181

182182

183+
184+
.. _repeated-warning-suppression-criteria:
185+
186+
Repeated Warning Suppression Criteria
187+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188+
189+
The filters that suppress repeated warnings apply the following criteria to determine if a warning is considered a repeat:
190+
191+
- ``"default"``: A warning is considered a repeat only if the (*message*, *category*, *module*, *lineno*) are all the same.
192+
- ``"module"``: A warning is considered a repeat if the (*message*, *category*, *module*) are the same, ignoring the line number.
193+
- ``"once"``: A warning is considered a repeat if the (*message*, *category*) are the same, ignoring the module and line number.
194+
195+
183196
.. _describing-warning-filters:
184197

185198
Describing Warning Filters

0 commit comments

Comments
 (0)