jenkins-bot submitted this change.
[IMPR] Filter does not have to be subclassed
Any instance can be passed which has a filter method with the same
semantics:
https://docs.python.org/3/library/logging.html?highlight=logging%20filter#logging.Filter
This also solves an deepsource PY-A6006 issue.
Change-Id: Ic2d3c345725ed33809c484be709f0c3d8b282149
---
M pywikibot/userinterfaces/terminal_interface_base.py
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py
index 9ba7545..b58e9c0 100644
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -608,12 +608,12 @@
self.UI.output(msg, targetStream=self.stream)
-class MaxLevelFilter(logging.Filter):
+class MaxLevelFilter():
"""Filter that only passes records at or below a specific level.
- (setting handler level only passes records at or *above* a specified level,
- so this provides the opposite functionality)
+ .. note:: setting handler level only passes records at or *above* a
+ specified level, so this provides the opposite functionality.
"""
To view, visit change 971568. To unsubscribe, or for help writing mail filters, visit settings.