Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New reverse-existence implementation (#1370)
* added reverse existence with some basic tests for top1000 words * added elementary words, docstrings,summary,sources, tests, and linting fixes * Rename "reverse_existence" checks to "restricted" Also, factor out word lists into module-level variables, for access from elsewhere. * tools: New reverse_existence_check implementation Searches for all (3+-character) words using a simple regexp, then walks the `finditer()` of non-overlapping matches, does some sanity-checking on the candidate string (no digits), and queues an error unless it appears on the list of permitted words. * Simplify allowed_word helper * Format list comprehension comprehensibly * Switch to CSV for restricted wordlists * Py3.8 balks at type annotation * More terse set-conversion code * Reformat CSV files to one-word-per-line * chore: crlf -> lf * refactor: replace csv library with simple read * style: apply lint * docs: update error message for restricted.top1000 --------- Co-authored-by: vqle <[email protected]> Co-authored-by: Nytelife26 <[email protected]>
- Loading branch information