pylint/checkers/logging.py
def visit_module(self, node):  # pylint: disable=unused-argument
        """Clears any state left in this checker from last module checked."""
        # The code being checked can just as easily "import logging as foo",
        # so it is necessary to process the imports and store in this field
        # what name the logging module is actually given.
        self._logging_names = set()
        logging_mods = self.config.logging_modules

        self._format_style = self.config.logging_format_style
        self._logging_modules = set(logging_mods)
        self._from_imports = {}
        for logging_mod in logging_mods:
            parts = logging_mod.rsplit(".", 1)
            if len(parts) > 1:
                self._from_imports[parts[0]] = parts[1]
def visit_module(self, node):  # pylint: disable=unused-argument
        # The code being checked can just as easily "import logging as foo",
        # so it is necessary to process the imports and store in this field
        # what name the logging module is actually given.
        self._logging_names = set()
        logging_mods = self.config.logging_modules

        self._format_style = self.config.logging_format_style
        self._logging_modules = set(logging_mods)
        self._from_imports = {}
        for logging_mod in logging_mods:
            parts = logging_mod.rsplit(".", 1)
            if len(parts) > 1:
                self._from_imports[parts[0]] = parts[1]
def visit_module ( self , node ) : # pylint: disable=unused-argument # The code being checked can just as easily "import logging as foo", # so it is necessary to process the imports and store in this field # what name the logging module is actually given. self . _logging_names = set ( ) logging_mods = self . config . logging_modules self . _format_style = self . config . logging_format_style self . _logging_modules = set ( logging_mods ) self . _from_imports = { } for logging_mod in logging_mods : parts = logging_mod . rsplit ( "." , 1 ) if len ( parts ) > 1 : self . _from_imports [ parts [ 0 ] ] = parts [ 1 ]
Clears any state left in this checker from last module checked.
Clears any state left in this checker from last module checked .