def __parse_doc_field(self, app, view, method, doc_field):
        name = doc_field.children[0].astext()
        content = rst_to_html(doc_field.children[1].rawsource)
        if name == 'response':
            self.response = app.config['responses'][content]
        elif name == 'plugin':
            for item in content.split():
                plugin = app.config['plugins'].get(item)
                if not plugin:
                    raise Exception('%s.%s use undefined plugin %s' % (view.__name__, method.__name__, item))
                self.plugins.append(plugin)
                self.plugin_keys.append(item)
                for error_code, error_message in plugin.error_codes.items():
                    self.__element_code_set(error_code, error_message, 'plugin ' + item)
        elif name.startswith('raise '):
            self.__element_code_set(name[6:], content)
        elif name.startswith('param '):
            items = name[6:].split()
            param_type = items[0]
            if param_type.endswith(']'):
                sub_type = app.config['parameter_types'].get(param_type.split('[')[1][:-1])
                param_type = app.config['parameter_types'].get(param_type.split('[')[0])
                param_type = param_type(sub_type)
            else:
                param_type = app.config['parameter_types'].get(param_type)
            if not param_type:
                raise Exception('%s.%s use undefined parameter type %s' % (self.__name__, method.__name__, items[0]))
            if param_type.support not in method.__name__.upper():
                raise Exception('%s.%s use parameter %s type that not support %s method.' %
                                (self.__name__, method.__name__, param_type.__name__, method.__name__.upper()))
            param = {'name': items[-1], 'type': param_type, 'requisite': False, 'description': content}
            if len(items) > 2 and items[1] == '*':
                param['requisite'] = True
                self.param_not_null.append(items[-1])
            else:
                self.param_allow_null.append(items[-1])
            self.param_list.append(param)
            self.param_dict[items[-1]] = param
            self.param_default[items[-1]] = None
            self.param_types[items[-1]] = param_type
            if isinstance(param['type'], List):
                self.__element_code_set(param_type.type.error_code, param_type.type.description, 'type')
                self.__element_code_set(param_type.error_code, param_type.description % param_type.type.__name__, 'type')
            elif param['type'] != Param:
                self.__element_code_set(param_type.error_code, param_type.description, 'type')
        else:
            setattr(self, name, content)
dataset/ETHPy150Open remyzane/flask-http-api/http_api/element.py/Element.__parse_doc_field/swapped operands of `not in`