(self)
Initialize the plugin reading patterns from the config.
Initialize the plugin reading patterns from the config.
Initialize the plugin reading patterns from the config .
def initialize_plugin(self) -> None:
        """
        Initialize the plugin reading patterns from the config.
        """
        try:
            config: SectionProxy = self.configuration[self.name]
        except KeyError:
            return
        else:
            logger.info(f"Initializing {self.name} plugin")
            if not self.initialized:
                for k in config:
                    pattern_strings = [
                        pattern for pattern in config[k].split("\n") if pattern
                    ]
                    self.patterns[k] = [
                        re.compile(pattern_string) for pattern_string in pattern_strings
                    ]
                logger.info(f"Initialized {self.name} plugin with {self.patterns}")
                self.initialized = True
def initialize_plugin ( self ) -> None : try : config : SectionProxy = self . configuration [ self . name ] except KeyError : return else : logger . info ( f"Initializing {self.name} plugin" ) if not self . initialized : for k in config : pattern_strings = [ pattern for pattern in config [ k ] . split ( "\n" ) if pattern ] self . patterns [ k ] = [ re . compile ( pattern_string ) for pattern_string in pattern_strings ] logger . info ( f"Initialized {self.name} plugin with {self.patterns}" ) self . initialized = True