Skip to content

Commit

Permalink
tools: rename unused variale in more pythonic way
Browse files Browse the repository at this point in the history
The 'Main' function in tools/test.py file was using a variable named
``all_outcomes`` to store a value not being used. It is a best practice
to name unused variables, often return values of functions/methods (as
in this case) as ``_`` [1]. This just helps keep the code a bit cleaner
and avoid any silly mistakes.

PR-URL: #16171
Refs: [1] https://stackoverflow.com/a/5477153
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
komawar authored and MylesBorins committed Nov 21, 2017
1 parent 60fc67e commit 0433a60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ def Main():
}
test_list = root.ListTests([], path, context, arch, mode)
unclassified_tests += test_list
(cases, unused_rules, all_outcomes) = (
(cases, unused_rules, _) = (
config.ClassifyTests(test_list, env))
if globally_unused_rules is None:
globally_unused_rules = set(unused_rules)
Expand Down

0 comments on commit 0433a60

Please sign in to comment.