def __init__(self):
"""Initialize a handler to count number of warnings."""
+
logging.Handler.__init__(self)
self.detected_problems = 0
def emit(self, record):
"""Increase number of warnings found"""
+
self.detected_problems += 1
\ No newline at end of file