(words: list[str])
| 74 | |
| 75 | |
| 76 | def main(words: list[str]) -> None: |
| 77 | if not words: |
| 78 | print('Please give one or more words to search.') |
| 79 | sys.exit(2) # command line usage error |
| 80 | index = InvertedIndex() |
| 81 | chars = index.search(' '.join(words)) |
| 82 | for line in format_results(chars): |
| 83 | print(line) |
| 84 | print('─' * 66, f'{len(chars)} found') |
| 85 | |
| 86 | |
| 87 | if __name__ == '__main__': |
no test coverage detected