code: 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
docs: Make a set of words, which shall be completed, from text