aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_information.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-09-17 18:33:12 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-09-17 18:33:12 +0200
commitcfb6b634f8330f29576a3e7afc9b1d199c7651bf (patch)
treeeada05ddd7d711ee24ee456acbf4ad9731955834 /tests/cogs/test_information.py
parentAdd basic tests for `bot.api`. (#424) (diff)
Enhance off-topic names search feature
https://github.com/python-discord/bot/issues/435 This commit is meant to enhance the search feature in three separate, but related ways: 1. By changing the type annotation of the query to OffTopicName, we will use the same character translation table for the query as we did when storing the off-topic name, leading to better matches. 2. By adding a membership test, `query in name`, we are better able to search for off-topic names using a substring. 3. Given point 1 and point 2, we can increase the cut-off value we use for `difflib.get_close_matches` so we reduce the number of matches that bear little resemblance to the query in our human eyes. This commit closes #435
Diffstat (limited to 'tests/cogs/test_information.py')
0 files changed, 0 insertions, 0 deletions