Skip to content

Commit

Permalink
STYLE: Avoid difficult to read anit-pattern
Browse files Browse the repository at this point in the history
Test for object identity should be 'is not'
https://www.flake8rules.com/rules/E714.html
  • Loading branch information
hjmjohnson committed Oct 19, 2020
1 parent bb1c7b5 commit 2e85876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Wrapping/Generators/Python/itkTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def __getitem__(self, parameters):
"""

parameters_type = type(parameters)
if not parameters_type is tuple and not parameters_type is list:
if (parameters_type is not tuple) and (parameters_type is not list):
# parameters is a single element.
# include it in a list to manage the 2 cases in the same way
parameters = [parameters]
Expand Down

0 comments on commit 2e85876

Please sign in to comment.