def visit_attribute(self, node):
        parent = node.parent
        expr = node.expr
        if self._is_getattr_or_name(expr, 'user'):
            if (node.attrname == 'is_authenticated' and
                    not isinstance(parent, CallFunc)):
                self.add_message('is-authenticated-not-called', node=node)
        elif self._is_getattr_or_name(expr, 'request'):
            if node.attrname in ('GET', 'POST'):
                if (isinstance(parent, Subscript) or
                        isinstance(parent, Getattr) and
                        parent.attrname == 'get'):
                    self.add_message('raw-get-post-access', node=node)
        elif isinstance(parent, Getattr) and node.attrname == 'objects':
            if parent.attrname == 'get':
                if self._is_view_function or self._is_view_class:
                    if not self._is_inside_try_except:
                        self.add_message(
                            'objects-get-without-doesnotexist', node=node)
                    else:
                        for h in self._try_except_node.handlers:
                            if self._is_does_not_exist(h.type):
                                break
                            elif isinstance(h.type, Tuple):
                                _does_not_exist_found = False
                                for exc_cls in h.type.elts:
                                    if self._is_does_not_exist(exc_cls):
                                        _does_not_exist_found = True
                                        break
                                if _does_not_exist_found:
                                    break
                        else:
                            self.add_message(
                                'objects-get-without-doesnotexist', node=node)
            elif parent.attrname in ('all', 'filter', 'exclude'):
                if self._is_len:
                    self.add_message('fetching-db-objects-len', node=node)
dataset/ETHPy150Open geerk/django_linter/django_linter/checkers/views.py/ViewsChecker.visit_attribute/original