From d0b61739003cf3b146f62a1f598ee4aae86cdf47 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Wed, 15 Feb 2023 21:08:27 +1100 Subject: [PATCH] Cleanup: name DUPLICATE_ACCEPT for accepted duplicates --- check_source/check_descriptions.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/check_source/check_descriptions.py b/check_source/check_descriptions.py index ba6f3af..ce238ea 100644 --- a/check_source/check_descriptions.py +++ b/check_source/check_descriptions.py @@ -9,7 +9,8 @@ this script updates XML themes once new settings are added import bpy -DUPLICATE_WHITELIST = ( +# These are known duplicates which do not warn. +DUPLICATE_ACCEPT = ( # operators ('ACTION_OT_clean', 'GRAPH_OT_clean'), ('ACTION_OT_clickselect', 'GRAPH_OT_clickselect'), @@ -89,7 +90,7 @@ def check_duplicates(): import rna_info DUPLICATE_IGNORE_FOUND = set() - DUPLICATE_WHITELIST_FOUND = set() + DUPLICATE_ACCEPT_FOUND = set() structs, funcs, ops, props = rna_info.BuildRNAInfo() @@ -112,18 +113,18 @@ def check_duplicates(): for v, k in sort_ls: if len(v) > 1: - if v not in DUPLICATE_WHITELIST: + if v not in DUPLICATE_ACCEPT: print("found %d: %r, \"%s\"" % (len(v), v, k)) - #print("%r," % (v,)) + # print("%r," % (v,)) else: - DUPLICATE_WHITELIST_FOUND.add(v) + DUPLICATE_ACCEPT_FOUND.add(v) test = (DUPLICATE_IGNORE - DUPLICATE_IGNORE_FOUND) if test: print("Invalid 'DUPLICATE_IGNORE': %r" % test) - test = (set(DUPLICATE_WHITELIST) - DUPLICATE_WHITELIST_FOUND) + test = (set(DUPLICATE_ACCEPT) - DUPLICATE_ACCEPT_FOUND) if test: - print("Invalid 'DUPLICATE_WHITELIST': %r" % test) + print("Invalid 'DUPLICATE_ACCEPT': %r" % test) def main(): -- GitLab