Skip to content

Commit

Permalink
Small fixes for modern flake8. (#395)
Browse files Browse the repository at this point in the history
It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Mar 26, 2024
1 parent 862520d commit 5dd06c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_set_param_with_node():
set_param.execute(lc)
node._perform_substitutions(lc)
actual_command = [perform_substitutions(lc, item) for item in
node.cmd if type(item[0]) == TextSubstitution]
node.cmd if isinstance(item[0], TextSubstitution)]
assert actual_command.count('--params-file') == 1
assert actual_command.count('-p') == 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def test_set_param_with_node():
node_2._perform_substitutions(lc)

actual_command_1 = [perform_substitutions(lc, item) for item in
node_1.cmd if type(item[0]) == TextSubstitution]
node_1.cmd if isinstance(item[0], TextSubstitution)]

actual_command_2 = [perform_substitutions(lc, item) for item in
node_2.cmd if type(item[0]) == TextSubstitution]
node_2.cmd if isinstance(item[0], TextSubstitution)]

assert actual_command_1[3] == '--params-file'
assert os.path.isfile(actual_command_1[4])
Expand Down

0 comments on commit 5dd06c9

Please sign in to comment.