takes one prefix line from the turtle file and binds the namespace
        to the class

        Args:
            line: the turtle prefix line string
775794
def _add_ttl_ns(self, line):
        
        lg = logging.getLogger("%s.%s" % (self.ln, inspect.stack()[0][3]))
        lg.setLevel(self.log_level)

        lg.debug("line:\n%s", line)
        line = str(line).strip()
        # if the line is not a prefix line exit
        if line is None or line == 'none' or line == '' \
                or not line.lower().startswith('@prefix'):
            return
        # parse the turtle line
        line = line.replace("@prefix","",1).strip()
        if line.endswith("."):
            line = line[:-1]
        prefix = line[:line.find(":")].strip()
        uri = self.clean_iri(line[line.find(":")+1:].strip())
        # add the namespace to the class
        lg.debug("\nprefix: %s  uri: %s", prefix, uri)
        self.bind(prefix, uri, override=False, calc=False)
1008372
def line_data(line:str) -> tuple:
    
    for regex, _ in LINE_TYPES.items():
        match = re.fullmatch(regex, line)
        if match:
            return match.groups()
    raise ValueError("Input line \"{}\" is not bubble formatted".format(line))
1078269
def _load_from(self, line):
        '''
        '''
        # Remove any comments
        line = line.split('#',1)[0]        
        line = re.sub('(F|f)(R|r)(O|o)(M|m):','', line).strip()
        bot.info('FROM %s' %line)
        self.config['from'] = line
1355309
def p_preprocessor_line_line(p):
    
    p.lexer.lineno = int(p[2]) + p.lexer.lineno - p.lineno(2)
1371939
def send_line(self, line, ending=None):
        
        if ending is None:
            ending = self.LINE_ENDING
        return self.send(line + ending)
267673
public void addLine(String line) {
        int sep = line.indexOf('=');
        if(sep > 0) {
            put(line.substring(0,sep),line.substring(sep+1));
        }
    }
1248358
def encode(cls, line):
        
        if not line.encoded:
            encoding = getattr(line, 'encoding_param', None)
            if encoding and encoding.upper() == cls.base64string:
                if isinstance(line.value, bytes):
                    line.value = codecs.encode(line.value, "base64").decode("utf-8").replace('\n', '')
                else:
                    line.value = codecs.encode(line.value.encode(encoding), "base64").decode("utf-8")
            else:
                line.value = backslashEscape(line.value)
            line.encoded = True
1276330
def from_line(cls, line):
        """"""
        line = line.decode(defenc)
        fields = line.split('\t', 1)
        if len(fields) == 1:
            info, msg = fields[0], None
        elif len(fields) == 2:
            info, msg = fields
        else:
            raise ValueError("Line must have up to two TAB-separated fields."
                             " Got %s" % repr(line))
        # END handle first split

        oldhexsha = info[:40]
        newhexsha = info[41:81]
        for hexsha in (oldhexsha, newhexsha):
            if not cls._re_hexsha_only.match(hexsha):
                raise ValueError("Invalid hexsha: %r" % (hexsha,))
            # END if hexsha re doesn't match
        # END for each hexsha

        email_end = info.find('>', 82)
        if email_end == -1:
            raise ValueError("Missing token: >")
        # END handle missing end brace

        actor = Actor._from_string(info[82:email_end + 1])
        time, tz_offset = parse_date(info[email_end + 2:])

        return RefLogEntry((oldhexsha, newhexsha, actor, (time, tz_offset), msg))
556536
def parse_line(self, line: str) -> None:
        
        if line[0].isspace():
            # continuation of a multi-line header
            if self._last_key is None:
                raise HTTPInputError("first header line cannot start with whitespace")
            new_part = " " + line.lstrip()
            self._as_list[self._last_key][-1] += new_part
            self._dict[self._last_key] += new_part
        else:
            try:
                name, value = line.split(":", 1)
            except ValueError:
                raise HTTPInputError("no colon in header line")
            self.add(name, value.strip())
1309328
def parse(cls, line, ns={}):
        
        definitions = []
        parses  = [p for p in cls.compositor_spec.scanString(line)]
        if len(parses) != 1:
            raise SyntaxError("Invalid specification syntax.")
        else:
            e = parses[0][2]
            processed = line[:e]
            if (processed.strip() != line.strip()):
                raise SyntaxError("Failed to parse remainder of string: %r" % line[e:])

        opmap = {op.__name__:op for op in Compositor.operations}
        for group in cls.compositor_spec.parseString(line):

            if ('mode' not in group) or group['mode'] not in ['data', 'display']:
                raise SyntaxError("Either data or display mode must be specified.")
            mode = group['mode']

            kwargs = {}
            operation = opmap[group['op']]
            spec = ' '.join(group['spec'].asList()[0])

            if  group['op'] not in opmap:
                raise SyntaxError("Operation %s not available for use with compositors."
                                  % group['op'])
            if  'op_settings' in group:
                kwargs = cls.todict(group['op_settings'][0], 'brackets', ns=ns)

            definition = Compositor(str(spec), operation, str(group['value']), mode, **kwargs)
            definitions.append(definition)
        return definitions
186142
def encode(cls, line):
        
        if not line.encoded:
            line.value = cls.listSeparator.join(backslashEscape(val)
                                                for val in line.value)
            line.encoded=True
543879
function namespaceBoundary(namespace, line) {
      // Demarcate a namespace "boundary" to build up an array of namespace line
      // "ranges" to be able to find which namespace a piece of code belongs to.
      if (currentNamespaceRange) {
        namespaceRanges.push(currentNamespaceRange);
      }
      if (namespace) {
        currentNamespaceRange = {
          name: namespace,
          line: line
        };
      }
    }
1311437
private ShellCommand getCommandForLine(final String line) {

		final int pos                             = line.indexOf(" ");
		final String commandString                = pos > 0 ? line.substring(0, pos) : line;
		final Class<? extends ShellCommand> clazz = commands.get(commandString);

		if (clazz != null) {

			try {

				return clazz.newInstance();

			} catch (Throwable t) {
				logger.warn("", t);
			}
		}

		return null;
	}
784967
def __process_line(line, strip_eol, strip):
    
    if strip:
        line = line.strip()
    elif strip_eol and line.endswith('\n'):
        line = line[:-1]
    return line
617860
def endline_handle(self, original, loc, tokens):
        """"""
        internal_assert(len(tokens) == 1, "invalid endline tokens", tokens)
        lines = tokens[0].splitlines(True)
        if self.minify:
            lines = lines[0]
        out = []
        ln = lineno(loc, original)
        for endline in lines:
            out.append(self.wrap_line_number(self.adjust(ln)) + endline)
            ln += 1
        return "".join(out)
1060421
def parse(self, line, namespace=None):
    
    try:
      if namespace is None:
        ipy = IPython.get_ipython()
        namespace = ipy.user_ns
      args = CommandParser.create_args(line, namespace)
      return self.parse_args(args)
    except Exception as e:
      print(str(e))
      return None
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