jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/971568 )

Change subject: [IMPR] Filter does not have to be subclassed
......................................................................

[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(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




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 https://gerrit.wikimedia.org/r/c/pywikibot/core/+/971568
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ic2d3c345725ed33809c484be709f0c3d8b282149
Gerrit-Change-Number: 971568
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to