Returns the marker that is displayed at the specified line number if
        any.

        :param line: The marker line.

        :return: Marker of None
        :rtype: pyqode.core.Marker
557542
def marker_for_line(self, line):
        
        markers = []
        for marker in self._markers:
            if line == marker.position:
                markers.append(marker)
        return markers
426740
def _get_mark_if_any(self):
        """"""
        line = self.next_line()
        if line.startswith(b'mark :'):
            return line[len(b'mark :'):]
        else:
            self.push_line(line)
            return None
222127
def find_in_line(line):  # type: (str)->Tuple[Optional[str],Optional[str]]
    
    if not line:
        return None, None
    for version_token in version_tokens:

        by_ast = find_by_ast(line, version_token)
        by_ast = validate_string(by_ast)
        if by_ast:
            return by_ast, version_token

        by_string_lib = find_version_by_string_lib(line, version_token)
        by_string_lib = validate_string(by_string_lib)
        if by_string_lib:
            return by_string_lib, version_token

        by_regex = find_version_by_regex(line, version_token)
        by_regex = validate_string(by_regex)
        if by_regex:
            return by_regex, version_token
    return None, None
108158
def raise_for_redefined_annotation(self, line: str, position: int, annotation: str) -> None:
        
        if self.disallow_redefinition and self.has_annotation(annotation):
            raise RedefinedAnnotationError(self.get_line_number(), line, position, annotation)
671976
def _marker_line(self):
        # type: () -> str
        
        output = ''
        for col in sorted(self.col_widths):
            line = self.COLUMN_MARK + (self.DASH * (self.col_widths[col] + self.PADDING * 2))
            output += line
        output += self.COLUMN_MARK + '\n'

        return output
962334
def filter_line(line: str, context: RunContext) -> typing.Optional[str]:
    
    if context.filters is not None:
        for filter_ in context.filters:
            if re.match(filter_, line):
                return None
    return line
362905
def __header(self, line):
        
        self.cpu_number = len(line.split())
        return self.cpu_number
692835
def parsePoint(line):
    
    values = [float(s) for s in line.split(' ')]
    if values[0] == -1:   # Convert -1 labels to 0 for MLlib
        values[0] = 0
    return LabeledPoint(values[0], values[1:])
948489
def highlight_line(self, payload):
        
        index_of_payload = self.target_line.lower().index(payload.lower())
        end_of_payload = index_of_payload + len(payload)

        self.target_line = u'{}{}{}'.format(
            self.target_line[:index_of_payload],
            self.apply_highlight(self.target_line[index_of_payload:end_of_payload]),
            self.target_line[end_of_payload:],
        )

        return self
1309443
def goto_line(self):
        
        helper = TextHelper(self)
        line, result = DlgGotoLine.get_line(
            self, helper.current_line_nbr(), helper.line_count())
        if not result:
            return
        return helper.goto_line(line, move=True)
34742
def readline(self):
        
        self.line_number += 1
        if self.line_number > len(self.lines):
            return ''
        return self.lines[self.line_number - 1]
1154206
function getPos(lines, lineNum, code, indicator) {

	var line, min, max, dots = false, prefix = 0;
	var pos = {};

	// console.log('code', code);

	// handle special cases
	if (code === '{{{{') {
		pos.min = 0;
		pos.max = 4;
		return pos;
	} else if (code === '{{{') {
		pos.min = 0;
		pos.max = 3;
		return pos;
	} else  if (code === '{{') {
		pos.min = 0;
		pos.max = 2;
		return pos;
	} else if (code.indexOf('{{<') !== -1) {
		pos.min = lines[lineNum].indexOf('{{<');
		pos.max = pos.min + 3;
		return pos;
	} else if (code === '{{}}') {
		pos.min = 0;
		pos.max = 4;
		return pos;
	} else if (code.indexOf('{{{}}{') !== -1) {
		pos.min = lines[lineNum].indexOf('{{{}}}');
		pos.max = pos.min + 6;
		return pos;
	} else if (code.indexOf('{{#}}') !== -1) {
		pos.min = lines[lineNum].indexOf('{{#}}');
		pos.max = pos.min + 5;
		return pos;
	}

	// trim off extra prefix and suffix from code which
	// could force us to not find the pos in the line.
	code = code.substring(0, indicator.length);
	code = code.replace('...', function() {
		dots = true;
		return '';
	});

	prefix = code.indexOf('{{');
	line = lines[lineNum];
	min = line.indexOf(code);
	min = min + prefix;
	max = (!dots)
		? min + indicator.length - 1
		: min + indicator.length - 4;

	// todo: if (min === max) max = findMax(line, min); // find first ' ' or '}'
	if (min === max) max++;

	if (min === -1) {
		return {
			min: 0,
			max: 1
		};
	} else {
		return {
			min: min,
			max: max
		};
	}
}
406443
def evaluate_marker(text, extra=None):
    
    try:
        marker = packaging.markers.Marker(text)
        return marker.evaluate()
    except packaging.markers.InvalidMarker as e:
        raise SyntaxError(e)
28027
def marker(self):
        
        dPt = self._ser.get_or_add_dPt_for_point(self._idx)
        return Marker(dPt)
1164402
def find_patch_position_by_line_number(line_number)
      target = changed_lines.find { |line| line.number == line_number }
      return nil unless target
      target.patch_position
    end
714580
@Override
    public void visitLineNumber(int line, Label start) {
        // If we haven't given a line number to the method entry, do so now.
        if (!methodEntryHasLineNumber) {
            methodEntryHasLineNumber = true;
            start = methodEntryLabel;
        }

        lineNumber = line;
        super.visitLineNumber(line, start);
    }
1217105
def get_line_str(self):
        """"""
        if self.from_string:
            return ' '.join([s for s in [self.merge_marker_str,
                                         self._datetime_str,
                                         self._line_str] if s])
        else:
            return ' '.join([s for s in [self._datetime_str,
                                         self._line_str] if s])