pylint/checkers/classes.py
def leave_functiondef(self, node):
        """on method node, check if this method couldn't be a function

        ignore class, static and abstract methods, initializer,
        methods overridden from a parent class.
        """
        if node.is_method():
            if node.args.args is not None:
                self._first_attrs.pop()
            if not self.linter.is_message_enabled("no-self-use"):
                return
            class_node = node.parent.frame()
            if (
                self._meth_could_be_func
                and node.type == "method"
                and node.name not in PYMETHODS
                and not (
                    node.is_abstract()
                    or overrides_a_method(class_node, node.name)
                    or decorated_with_property(node)
                    or _has_bare_super_call(node)
                )
            ):
                self.add_message("no-self-use", node=node)
def leave_functiondef(self, node):
        if node.is_method():
            if node.args.args is not None:
                self._first_attrs.pop()
            if not self.linter.is_message_enabled("no-self-use"):
                return
            class_node = node.parent.frame()
            if (
                self._meth_could_be_func
                and node.type == "method"
                and node.name not in PYMETHODS
                and not (
                    node.is_abstract()
                    or overrides_a_method(class_node, node.name)
                    or decorated_with_property(node)
                    or _has_bare_super_call(node)
                )
            ):
                self.add_message("no-self-use", node=node)
def leave_functiondef ( self , node ) : if node . is_method ( ) : if node . args . args is not None : self . _first_attrs . pop ( ) if not self . linter . is_message_enabled ( "no-self-use" ) : return class_node = node . parent . frame ( ) if ( self . _meth_could_be_func and node . type == "method" and node . name not in PYMETHODS and not ( node . is_abstract ( ) or overrides_a_method ( class_node , node . name ) or decorated_with_property ( node ) or _has_bare_super_call ( node ) ) ) : self . add_message ( "no-self-use" , node = node )
on method node, check if this method couldn't be a function

        ignore class, static and abstract methods, initializer,
        methods overridden from a parent class.
on method node check if this method couldn t be a function