From e413bbaf367e08430f45b21114e1d5b3473c4d3c Mon Sep 17 00:00:00 2001 From: Nathan Fritzler Date: Fri, 15 Jul 2022 13:24:45 -0600 Subject: [PATCH] Fix create_luacheck I've tested this code. --- tools/create_luacheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/create_luacheck.py b/tools/create_luacheck.py index 8b55c1376..d3ee5d038 100755 --- a/tools/create_luacheck.py +++ b/tools/create_luacheck.py @@ -19,7 +19,7 @@ pathlist = Path(path).rglob('*.lua') for path in pathlist: path_in_str = str(path) # print(path_in_str) - trouve = False + found = False with open(path_in_str) as f: local_vars = [] for i, line in enumerate(f.readlines()): @@ -38,7 +38,7 @@ for path in pathlist: local_vars.append(n.group('local_var')) if not found: - nb_varloc = len(variables_locales) + nb_varloc = len(local_vars) #print(path_in_str, ": -", "({} variables locales)".format(nb_varloc) if nb_varloc > 0 else '') print(', '.join(['"{}"'.format(v) for v in global_vars]))