From 7e4c0313283304bd8f020eaedb94b35e75b50068 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 2 Mar 2022 17:29:27 +1100 Subject: Cleanup: remove all tweak events from key-map presets --- tests/python/bl_keymap_validate.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/python') diff --git a/tests/python/bl_keymap_validate.py b/tests/python/bl_keymap_validate.py index 7bd40ce97e7..1743893dc8a 100644 --- a/tests/python/bl_keymap_validate.py +++ b/tests/python/bl_keymap_validate.py @@ -63,6 +63,12 @@ PRESET_PREFS = { ), } +# Don't report duplicates for these presets. +ALLOW_DUPLICATES = { + # This key-map manipulates the default key-map, making it difficult to avoid duplicates entirely. + "Industry_Compatible" +} + # ----------------------------------------------------------------------------- # Generic Utilities @@ -271,7 +277,6 @@ def main() -> None: presets = keyconfig_preset_scan() for filepath in presets: name_only = os.path.splitext(os.path.basename(filepath))[0] - for config in PRESET_PREFS.get(name_only, ((),)): name_only_with_config = name_only + keyconfig_config_as_filename_component(config) print("KeyMap Validate:", name_only_with_config, end=" ... ") @@ -307,7 +312,10 @@ def main() -> None: # Perform an additional sanity check: # That there are no identical key-map items. - error_text_duplicates = keyconfig_report_duplicates(data_orig) + if name_only not in ALLOW_DUPLICATES: + error_text_duplicates = keyconfig_report_duplicates(data_orig) + else: + error_text_duplicates = "" if error_text_consistency or error_text_duplicates: print("FAILED!") -- cgit v1.2.3