Validates and processes the line passed in and converts it to a
        Python object if necessary.
190866
def _process_data(self, line):
        
        skip = False
        if self._raw_data:
            return skip, line
        line = unicode_(line)
        if not line:
            if (self._options.get('heartbeat', False) and
                    self._options.get('feed') in ('continuous', 'longpoll') and
                    not self._last_seq):
                line = None
            else:
                skip = True
        elif line in ('{"results":[', '],'):
            skip = True
        elif line[-1] == ',':
            line = line[:-1]
        elif line[:10] == ('"last_seq"'):
            line = '{' + line
        try:
            if line:
                data = json.loads(line)
                if data.get('last_seq'):
                    self._last_seq = data['last_seq']
                    skip = True
            else:
                data = None
        except ValueError:
            data = {"error": "Bad JSON line", "line": line}
        return skip, data
1175466
def process_input(self, character):
        
        func = None
        try:
            func = getattr(self, "handle_%s" % chr(character), None)
        except:
            pass
        if func:
            func()
1199203
def readline(self):
        
        _complain_ifclosed(self.closed)
        line = self.f.readline()
        if self.__encoding:
            return line.decode(self.__encoding, self.__errors)
        else:
            return line
633671
def _process_dupe_code_violation(self, lines, current_line, message):
        
        src_paths = []
        message_match = self.dupe_code_violation_regex.match(message)
        if message_match:
            for _ in range(int(message_match.group(1))):
                current_line += 1
                match = self.multi_line_violation_regex.match(
                    lines[current_line]
                )
                src_path, l_number = match.groups()
                src_paths.append(('%s.py' % src_path, l_number))
        return src_paths
1021479
def process_raw(self, raw: str) -> None:
        
        raw_params = dict(group.split('=', 1) for group in raw.splitlines())

        super().process_raw(raw_params)
1025925
def _check_line_for_encoding(line):
    """"""
    i = 0
    for i in range(len(line)):
        if line[i] == b'#':
            break
        if line[i] not in b' \t\014':
            return None, False  # Not a comment, don't read the second line.
    return pytokenizer.match_encoding_declaration(line[i:]), True
193890
def parseString(self, line: str, line_number: int = 0) -> ParseResults:  # noqa: N802
        
        self._line_number = line_number
        return self.language.parseString(line)
415920
def process(inputLines: List[str]) -> str:
    """"""
    lines = separate_trailing_comments(inputLines)
    merge_continued_lines(lines)
    (lines, comments) = extract_comments(lines)
    actual_lines = [
        line[1]
        for line in lines
        if line[1] is not None and "i_g_n_o_r_e___m_e_" not in line[1]
    ]
    return "".join(actual_lines)
418054
def parse(self, line, **options):
        
        line = line.strip()
        if not line:
            return (False, (), {})
        split = line.split()
        cmd, args = split[0], split[1:]
        return (cmd, args, {})
341772
def _line_parse(line):
    
    if line[-2:] in ["\r\n", b"\r\n"]:
        return line[:-2], True
    elif line[-1:] in ["\r", "\n", b"\r", b"\n"]:
        return line[:-1], True
    return line, False
77265
def _parse_line(sep, line):
    
    strs = line.split(sep, 1)
    return (strs[0].strip(), None) if len(strs) == 1 else (strs[0].strip(), strs[1].strip())
787727
def __parse_stream(self, stream, parse_line):
        """"""

        if not stream:
            raise InvalidFormatError(cause='stream cannot be empty or None')

        nline = 0
        lines = stream.split('\n')

        for line in lines:
            nline += 1

            # Ignore blank lines and comments
            m = re.match(self.LINES_TO_IGNORE_REGEX, line, re.UNICODE)
            if m:
                continue

            m = re.match(self.VALID_LINE_REGEX, line, re.UNICODE)
            if not m:
                cause = "line %s: invalid format" % str(nline)
                raise InvalidFormatError(cause=cause)

            try:
                result = parse_line(m.group(1), m.group(2))
                yield result
            except InvalidFormatError as e:
                cause = "line %s: %s" % (str(nline), e)
                raise InvalidFormatError(cause=cause)
189927
def to_python(self, value):
        
        value = '' if value in validators.EMPTY_VALUES else smart_text(value)
        if value == self.empty_value or value in validators.EMPTY_VALUES:
            return self.empty_value
        try:
            value = self.coerce(value)
        except (ValueError, TypeError, ValidationError):
            self._on_invalid_value(value)
        return value
1121945
def _handle_lines(self):
        """"""
        while b'\xdd' in self._buffer:
            linebuf, self._buffer = self._buffer.rsplit(b'\xdd', 1)
            line = linebuf[-19:]
            self._buffer += linebuf[:-19]
            if self._valid_packet(line):
                self._handle_raw_packet(line)
            else:
                self.logger.warning('dropping invalid data: %s',
                                    binascii.hexlify(line))
823966
def parse_line(line):
  
  columns = line.split()
  token = columns.pop(0)
  values = [float(column) for column in columns]
  return token, values
1034871
def _scan_line(self, line):
        
        is_quote_header = self.QUOTE_HDR_REGEX.match(line) is not None
        is_quoted = self.QUOTED_REGEX.match(line) is not None
        is_header = is_quote_header or self.HEADER_REGEX.match(line) is not None

        if self.fragment and len(line.strip()) == 0:
            if self.SIG_REGEX.match(self.fragment.lines[-1].strip()):
                self.fragment.signature = True
                self._finish_fragment()

        if self.fragment \
                and ((self.fragment.headers == is_header and self.fragment.quoted == is_quoted) or
                         (self.fragment.quoted and (is_quote_header or len(line.strip()) == 0))):

            self.fragment.lines.append(line)
        else:
            self._finish_fragment()
            self.fragment = Fragment(is_quoted, line, headers=is_header)
306570
def _parse_line(self, line):
        
        fields = line.split('|', 4)  # stop splitting after fourth | found
        line_info = {'raw_message': line}
        if len(fields) == 5:
            line_info.update(dict(zip(self._fieldnames, fields)))
        return line_info