Merge pull request #3457 from chiizujin/help_category

Fix file help topic category casing differences appearing as duplicates
This commit is contained in:
Griatch 2024-03-30 15:47:29 +01:00 committed by GitHub
commit 13b36d2669
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -227,7 +227,7 @@ class FileHelpStorageHandler:
for dct in loaded_help_dicts:
key = dct.get("key").lower().strip()
category = dct.get("category", _DEFAULT_HELP_CATEGORY).strip()
category = dct.get("category", _DEFAULT_HELP_CATEGORY).lower().strip()
aliases = list(dct.get("aliases", []))
entrytext = dct.get("text", "")
locks = dct.get("locks", "")

View file

@ -138,5 +138,5 @@ class TestFileHelp(TestCase):
for inum, helpentry in enumerate(result):
self.assertEqual(HELP_ENTRY_DICTS[inum]["key"], helpentry.key)
self.assertEqual(HELP_ENTRY_DICTS[inum].get("aliases", []), helpentry.aliases)
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"], helpentry.help_category)
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"].lower(), helpentry.help_category)
self.assertEqual(HELP_ENTRY_DICTS[inum]["text"], helpentry.entrytext)