(self, cbTS, candidates)
| 2770 | return charStr |
| 2771 | |
| 2772 | def sortByPhrase(self, cbTS, candidates): |
| 2773 | sortbyphraselist = [] |
| 2774 | if cbTS.userphrase.isInCharDef(cbTS.lastCommitString): |
| 2775 | sortbyphraselist = cbTS.userphrase.getCharDef(cbTS.lastCommitString) |
| 2776 | if PhraseData.phrase.isInCharDef(cbTS.lastCommitString): |
| 2777 | if len(sortbyphraselist) == 0: |
| 2778 | sortbyphraselist = PhraseData.phrase.getCharDef(cbTS.lastCommitString) |
| 2779 | else: |
| 2780 | plist = PhraseData.phrase.getCharDef(cbTS.lastCommitString) |
| 2781 | for pstr in plist: |
| 2782 | if not pstr in sortbyphraselist: |
| 2783 | sortbyphraselist.append(pstr) |
| 2784 | |
| 2785 | i = 0 |
| 2786 | if len(sortbyphraselist) > 0: |
| 2787 | for pStr in sortbyphraselist: |
| 2788 | if pStr in candidates: |
| 2789 | candidates.remove(pStr) |
| 2790 | candidates.insert(i, pStr) |
| 2791 | i += 1 |
| 2792 | return candidates |
| 2793 | |
| 2794 | # List 分段 |
| 2795 | def chunks(self, l, n): |
no test coverage detected