File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def lint_hotkeys_file() -> None:
39
39
existing OUTPUT_FILE
40
40
"""
41
41
hotkeys_file_string = get_hotkeys_file_string ()
42
- error_flag = 0 if is_every_key_category_valid () else 1
42
+ error_flag = not is_every_key_category_valid ()
43
43
# To lint keys description
44
44
categories = read_help_categories ()
45
45
for action in HELP_CATEGORIES :
@@ -53,7 +53,7 @@ def lint_hotkeys_file() -> None:
53
53
f"Description - ({ help_text } ) for key combination - [{ various_key_combinations } ]\n "
54
54
"It should contain only alphabets, spaces and special characters except ."
55
55
)
56
- error_flag = 1
56
+ error_flag = True
57
57
# Check key combination duplication
58
58
check_duplicate_keys_list = [
59
59
key for key in check_duplicate_keys_list if key not in KEYS_TO_EXCLUDE
@@ -67,16 +67,16 @@ def lint_hotkeys_file() -> None:
67
67
print (
68
68
f"Duplicate key combination for keys { duplicate_keys } for category ({ HELP_CATEGORIES [action ]} ) detected"
69
69
)
70
- error_flag = 1
71
- if error_flag == 1 :
70
+ error_flag = True
71
+ if error_flag is True :
72
72
print (f"Rerun this command after resolving errors in config/{ KEYS_FILE_NAME } " )
73
73
else :
74
74
print ("No hotkeys linting errors" )
75
75
if not output_file_matches_string (hotkeys_file_string ):
76
76
print (
77
77
f"Run './tools/{ SCRIPT_NAME } --fix' to update { OUTPUT_FILE_NAME } file"
78
78
)
79
- error_flag = 1
79
+ error_flag = True
80
80
sys .exit (error_flag )
81
81
82
82
You can’t perform that action at this time.
0 commit comments