pylint/pyreverse/utils.py
def get_callbacks(self, node):
        """get callbacks from handler for the visited node"""
        klass = node.__class__
        methods = self._cache.get(klass)
        if methods is None:
            handler = self.handler
            kid = klass.__name__.lower()
            e_method = getattr(
                handler, "visit_%s" % kid, getattr(handler, "visit_default", None)
            )
            l_method = getattr(
                handler, "leave_%s" % kid, getattr(handler, "leave_default", None)
            )
            self._cache[klass] = (e_method, l_method)
        else:
            e_method, l_method = methods
        return e_method, l_method
def get_callbacks(self, node):
        """get callbacks from handler for the visited node"""
        klass = node.__class__
        methods = self._cache.get(klass)
        if methods is None:
            handler = self.handler
            kid = klass.__name__.lower()
            e_method = getattr(
                handler, "visit_%s" % kid, getattr(handler, "visit_default", None)
            )
            l_method = getattr(
                handler, "leave_%s" % kid, getattr(handler, "leave_default", None)
            )
            self._cache[klass] = (e_method, l_method)
        else:
            e_method, l_method = methods
        return e_method, l_method
def get_callbacks ( self , node ) : klass = node . __class__ methods = self . _cache . get ( klass ) if methods is None : handler = self . handler kid = klass . __name__ . lower ( ) e_method = getattr ( handler , "visit_%s" % kid , getattr ( handler , "visit_default" , None ) ) l_method = getattr ( handler , "leave_%s" % kid , getattr ( handler , "leave_default" , None ) ) self . _cache [ klass ] = ( e_method , l_method ) else : e_method , l_method = methods return e_method , l_method
get callbacks from handler for the visited node
get callbacks from handler for the visited node