(wordlist: list[str], j: int = 0)
| 35 | |
| 36 | |
| 37 | def prefix(wordlist: list[str], j: int = 0) -> str: |
| 38 | d = {} |
| 39 | i = j |
| 40 | try: |
| 41 | while 1: |
| 42 | for word in wordlist: |
| 43 | d[word[i]] = 1 |
| 44 | if len(d) > 1: |
| 45 | return wordlist[0][j:i] |
| 46 | i += 1 |
| 47 | d = {} |
| 48 | except IndexError: |
| 49 | return wordlist[0][j:i] |
| 50 | return "" |
| 51 | |
| 52 | |
| 53 | STRIPCOLOR_REGEX = re.compile(r"\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[m|K]") |
no outgoing calls
no test coverage detected
searching dependent graphs…