on xenial help sign in
rename variables
commit59f23fd41f95ef864552e95024b1f822bcef23b2 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateMon 8 Aug 2016, 11:24 (10 years ago) parentc425c44
1 file changed+5−5
tests/imports/check_imports.py+5−5
tests/imports/check_imports.py+5−5
@@ -89,7 +89,7 @@ flickable_pats = [flickable_pat, listview_pat, gridview_pat]
8989unity_components_pat = re.compile(r'.*import ".*Components"')
9090components_path = re.compile(r'.*qml/Components.*')
9191
92−def scan_for_flickable_imports(file_path, component_pats, qtquick_pat, uitk_pat):
92+def scan_for_flickable_imports(file_path, component_pats, qtquick_pat, unitycomponents_pat):
9393 errors = []
9494 with open(file_path, 'rt', encoding='utf-8') as ifile, open(file_path, 'rt', encoding='utf-8') as i2file:
9595 flickable_found = False
@@ -99,17 +99,17 @@ def scan_for_flickable_imports(file_path, component_pats, qtquick_pat, uitk_pat)
9999 flickable_found = True
100100 if flickable_found:
101101 qtquick_found = False
102− uitk_found = False
102+ unitycomponents_found = False
103103 for lino, line in enumerate(i2file, start=1):
104104 if not qtquick_found and qtquick_pat.match(line):
105105 qtquick_found = True
106− if uitk_pat.match(line):
107− uitk_found = True
106+ if unitycomponents_pat.match(line):
107+ unitycomponents_found = True
108108 if not qtquick_found:
109109 errors.append(lino)
110110 else:
111111 return
112− if not uitk_found:
112+ if not unitycomponents_found:
113113 errors.append(lino)
114114 if 0 < len(errors) <= 10:
115115 if len(errors) > 1: