|
60 | 60 |
|
61 | 61 |
|
62 | 62 | LOWEST_POSSIBLE_GH_ISSUE_NUMBER = 32426 |
| 63 | +SECTION_ALIASES = { |
| 64 | + 'api': 'C API', |
| 65 | + 'capi': 'C API', |
| 66 | + 'builtin': 'Core and Builtins', |
| 67 | + 'builtins': 'Core and Builtins', |
| 68 | + 'core': 'Core and Builtins', |
| 69 | + 'demo': 'Tools/Demos', |
| 70 | + 'demos': 'Tools/Demos', |
| 71 | + 'tool': 'Tools/Demos', |
| 72 | + 'tools': 'Tools/Demos', |
| 73 | +} |
63 | 74 |
|
64 | 75 | # |
65 | 76 | # This template is the canonical list of acceptable section names! |
@@ -877,21 +888,7 @@ def _find_smart_matches(section): |
877 | 888 |
|
878 | 889 | # Special cases and aliases |
879 | 890 | normalized = ''.join(section_words).lower() |
880 | | - |
881 | | - # Check special aliases |
882 | | - aliases = { |
883 | | - 'api': 'C API', |
884 | | - 'capi': 'C API', |
885 | | - 'builtin': 'Core and Builtins', |
886 | | - 'builtins': 'Core and Builtins', |
887 | | - 'core': 'Core and Builtins', |
888 | | - 'demo': 'Tools/Demos', |
889 | | - 'demos': 'Tools/Demos', |
890 | | - 'tool': 'Tools/Demos', |
891 | | - 'tools': 'Tools/Demos', |
892 | | - } |
893 | | - |
894 | | - for alias, section_name in aliases.items(): |
| 891 | + for alias, section_name in SECTION_ALIASES.items(): |
895 | 892 | if normalized.startswith(alias): |
896 | 893 | if section_name not in matches: |
897 | 894 | matches.append(section_name) |
|
0 commit comments