Adjust keywords, if needed.
544811
def _adj_include_only(self):
        """"""
        if 'include_only' in self.kws:
            # Process GO IDs specified in include_only
            goids = self._get_goids(self.kws['include_only'])
            # include_only can take a list of GO IDs on cmdline or in a file.
            #     --include_only=GO:0043473,GO:0009987
            #     --include_only=include_only.txt
            if goids:
                self.kws['include_only'] = goids
            else:
                raise Exception("NO GO IDs FOUND IN include_only")
890309
def adjust!(other)
      @x0 = other.x0 if other.x0 < @x0
      @y0 = other.y0 if other.y0 < @y0
      @x1 = other.x1 if other.x1 > @x1
      @y1 = other.y1 if other.y1 > @y1
    end
388205
def putkeyword(self, keyword, value, makesubrecord=False):
        """"""
        return self._table.putcolkeyword(self._column, keyword, value, makesubrecord)
934305
def update_search_letters(self, text):
        """"""
        self.letters = text
        names = [shortcut.name for shortcut in self.shortcuts]
        results = get_search_scores(text, names, template='<b>{0}</b>')
        self.normal_text, self.rich_text, self.scores = zip(*results)
        self.reset()
22877
def setup(self, keywords=None):  # pylint: disable=arguments-differ
    
    self._keywords = keywords
    self._output_path = tempfile.mkdtemp()
551807
def AdjustDescriptor(self, fields):
    """"""

    for f in fields:
      if f.name == "args_rdf_name":
        f.name = "payload_type"

      if f.name == "args":
        f.name = "payload"

    return fields
530552
def match_keyword(token, keywords):
    
    if not token:
        return False
    if not token.is_keyword:
        return False

    return token.value.upper() in keywords
935181
def targetword(self, index, targetwords, alignment):
        """"""
        if alignment[index]:
            return targetwords[alignment[index]]
        else:
            return None
606311
def adjust_flow(self, category):
        """"""

        status = flow_control.SKIP
        for allow in self.allow:
            if self.match(category, allow):
                status = flow_control.ALLOW
                for skip in self.skip:
                    if self.match(category, skip):
                        status = flow_control.SKIP
                for halt in self.halt:
                    if self.match(category, halt):
                        status = flow_control.HALT
                if status != flow_control.ALLOW:
                    break
        return status
632018
def adjustText(self):
        
        pos = self.cursorPosition()
        self.blockSignals(True)
        super(XLineEdit, self).setText(self.formatText(self.text()))
        self.setCursorPosition(pos)
        self.blockSignals(False)
904910
def escape_keywords(arr):
    """"""
    for i in arr:
        i = i if i not in kwlist else i + '_'
        i = i if '-' not in i else i.replace('-', '_')
        yield i
316072
function optimize_keyword_group($key) {
        $this->language_data['CACHED_KEYWORD_LISTS'][$key] =
            $this->optimize_regexp_list($this->language_data['KEYWORDS'][$key]);
        $space_as_whitespace = false;
        if(isset($this->language_data['PARSER_CONTROL'])) {
            if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) {
                if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'])) {
                    $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'];
                }
                if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) {
                    if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) {
                        $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'];
                    }
                }
            }
        }
        if($space_as_whitespace) {
            foreach($this->language_data['CACHED_KEYWORD_LISTS'][$key] as $rxk => $rxv) {
                $this->language_data['CACHED_KEYWORD_LISTS'][$key][$rxk] =
                    str_replace(" ", "\\s+", $rxv);
            }
        }
    }
929459
def _post_keywords(self, **kwargs):
        """"""
        if self.jurisdiction and 'jurisdiction_id' not in kwargs:
            kwargs['jurisdiction_id'] = self.jurisdiction
        if 'address' in kwargs:
            address = kwargs.pop('address')
            kwargs['address_string'] = address
        if 'name' in kwargs:
            first, last = kwargs.pop('name').split(' ')
            kwargs['first_name'] = first
            kwargs['last_name'] = last
        if 'api_key' not in kwargs:
            kwargs['api_key'] = self.api_key
        return kwargs
1093791
def adjust_cells(self):
        """"""
        self.resizeColumnsToContents()
        fm = self.horizontalHeader().fontMetrics()
        names = [fm.width(s.name + ' '*9) for s in self.source_model.shortcuts]
        self.setColumnWidth(NAME, max(names))
        self.horizontalHeader().setStretchLastSection(True)
1127451
def multi_keyword(tokens, keyword_parts):
    """"""
    tokens = iter(tokens)
    matched_tokens = []
    limit = len(keyword_parts)

    for idx in six.moves.range(limit):
        try:
            token = next(tokens)
        except StopIteration:
            return

        if (not token or token.name != "symbol" or
                token.value.lower() != keyword_parts[idx]):
            return

        matched_tokens.append(token)

    return TokenMatch(None, token.value, matched_tokens)
122125
private void adaptText() {
        if (editText != null) {
            editText.setText(text);

            if (text != null) {
                editText.setSelection(text.length());
            }
        }
    }
1085567
def _updateWordSet(self):
        
        self._wordSet = set(self._keywords) | set(self._customCompletions)

        start = time.time()

        for line in self._qpart.lines:
            for match in _wordRegExp.findall(line):
                self._wordSet.add(match)
            if time.time() - start > self._WORD_SET_UPDATE_MAX_TIME_SEC:
                """It is better to have incomplete word set, than to freeze the GUI"""
                break