def _process_pytype(self, lineno, data, open_ended):
    'Process a pytype: comment.'
    if (not data):
        raise _DirectiveError('Invalid directive syntax.')
    for option in data.split():
        if (option == 'skip-file'):
            raise SkipFile()
        try:
            (command, values) = option.split('=', 1)
            values = values.split(',')
        except ValueError:
            raise _DirectiveError('Invalid directive syntax.')
        if (command == 'disable'):
            disable = True
        elif (command == 'enable'):
            disable = False
        else:
            raise _DirectiveError(("Unknown pytype directive: '%s'" % command))
        if (not values):
            raise _DirectiveError('Disable/enable must specify one or more error names.')
        for error_name in values:
            if ((error_name == _ALL_ERRORS) or self._errorlog.is_valid_error_name(error_name)):
                lines = self._disables[error_name]
                if open_ended:
                    lines.start_range(lineno, disable)
                else:
                    lines.set_line(lineno, disable)
            else:
                self._errorlog.invalid_directive(self._filename, lineno, ("Invalid error name: '%s'" % error_name))
Process a pytype: comment.
def _process_pytype(self, lineno, data, open_ended):
    
    if (not data):
        raise _DirectiveError('Invalid directive syntax.')
    for option in data.split():
        if (option == 'skip-file'):
            raise SkipFile()
        try:
            (command, values) = option.split('=', 1)
            values = values.split(',')
        except ValueError:
            raise _DirectiveError('Invalid directive syntax.')
        if (command == 'disable'):
            disable = True
        elif (command == 'enable'):
            disable = False
        else:
            raise _DirectiveError(("Unknown pytype directive: '%s'" % command))
        if (not values):
            raise _DirectiveError('Disable/enable must specify one or more error names.')
        for error_name in values:
            if ((error_name == _ALL_ERRORS) or self._errorlog.is_valid_error_name(error_name)):
                lines = self._disables[error_name]
                if open_ended:
                    lines.start_range(lineno, disable)
                else:
                    lines.set_line(lineno, disable)
            else:
                self._errorlog.invalid_directive(self._filename, lineno, ("Invalid error name: '%s'" % error_name))