pylint/checkers/classes.py
def _check_proper_bases(self, node):
        """
        Detect that a class inherits something which is not
        a class or a type.
        """
        for base in node.bases:
            ancestor = safe_infer(base)
            if ancestor in (astroid.Uninferable, None):
                continue
            if isinstance(ancestor, astroid.Instance) and ancestor.is_subtype_of(
                "%s.type" % (BUILTINS,)
            ):
                continue

            if not isinstance(ancestor, astroid.ClassDef) or _is_invalid_base_class(
                ancestor
            ):
                self.add_message("inherit-non-class", args=base.as_string(), node=node)

            if ancestor.name == object.__name__:
                self.add_message(
                    "useless-object-inheritance", args=node.name, node=node
                )
def _check_proper_bases(self, node):
        """
        Detect that a class inherits something which is not
        a class or a type.
        """
        for base in node.bases:
            ancestor = safe_infer(base)
            if ancestor in (astroid.Uninferable, None):
                continue
            if isinstance(ancestor, astroid.Instance) and ancestor.is_subtype_of(
                "%s.type" % (BUILTINS,)
            ):
                continue

            if not isinstance(ancestor, astroid.ClassDef) or _is_invalid_base_class(
                ancestor
            ):
                self.add_message("inherit-non-class", args=base.as_string(), node=node)

            if ancestor.name == object.__name__:
                self.add_message(
                    "useless-object-inheritance", args=node.name, node=node
                )
Detect that a class inherits something which is not
        a class or a type.