def __init__(self, readonly=False, output_interval=None): super(BaseProcessor, self).__init__() self.readonly = readonly self.output_interval = output_interval self.receivers = [ MixCharactersReceiver(), # HeadersSyntaxReceiver(), # HeadersLevelsReceiver(), # HeadersUnknownReceiver(), InflectionReceiver(), ] checkers_system.set_checkers([ CyrlLatnArticleTitle, CyrlLatnTemplateTitle, CategoryTemplate, LengthTemplate, CategoryInclude, RuShowText, CfAkut, CfSeveral, RuAbsent, RuWrongOrder, RuUnknown, ]) properties_system.set_builders([ QualityRu, ])
def __init__(self, checkers, max_num=None): super(CheckerRunner, self).__init__() if type(checkers) != list: checkers = [checkers] if inspect.isclass(checkers[0]): checkers_system.set_checkers(checkers) else: checkers_system.set_obj_checkers(checkers) self.max_num = max_num