Skip to content

Commit 3f8f644

Browse files
committed
Better naming for problematic errors
Instead of naming the wanted report errors be `important_errors`, it may be better to name it as `problematic_error`. Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 208e83a commit 3f8f644

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/attributecode/cmd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
%(__copyright__)s
6565
''' % locals()
6666

67-
important_errors = [u'CRITICAL', u'ERROR', u'WARNING']
67+
problematic_errors = [u'CRITICAL', u'ERROR', u'WARNING']
6868

6969
class AboutCommand(click.Command):
7070
def main(self, args=None, prog_name=None, complete_var=None,
@@ -229,16 +229,16 @@ def check(location):
229229
print_errors = []
230230
for severity, message in errors:
231231
sever = severities[severity]
232-
if sever in important_errors:
232+
if sever in problematic_errors:
233233
print_errors.append((msg_format % locals()))
234234

235-
number_of_important_errors = len(print_errors)
235+
number_of_problematic_errors = len(print_errors)
236236

237237
for err in print_errors:
238238
print(err)
239239

240240
if print_errors:
241-
click.echo('Found %(number_of_important_errors)d errors' % locals())
241+
click.echo('Found %(number_of_problematic_errors)d errors' % locals())
242242
sys.exit(1)
243243
else:
244244
click.echo('No error is found.')

0 commit comments

Comments
 (0)