Skip to content

Commit

Permalink
COMP: Shadows name 'input_type','keys' from outer scope
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmjohnson committed Oct 19, 2020
1 parent cc1b39e commit db612aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Wrapping/Generators/Python/itkTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,13 @@ def New(self, *args, **kwargs):
return self._NewMeshReader(itk.MeshFileReader, *args, **kwargs)
primary_input_methods = ("Input", "InputImage", "Input1")

def ttype_for_input_type(keys, input_type):
keys_first = list(filter(lambda k: k[0] == input_type, keys))
def ttype_for_input_type(keys_l, input_type_l):
keys_first = list(filter(lambda k: k[0] == input_type_l, keys_l))
# If there is more than one match, prefer the filter where the
# second template argument, typically the second input or the
# output, has the same type as the input
keys_second = list(
filter(lambda k: len(k) > 1 and k[1] == input_type, keys_first)
filter(lambda k: len(k) > 1 and k[1] == input_type_l, keys_first)
)
if len(keys_second):
return keys_second
Expand Down

0 comments on commit db612aa

Please sign in to comment.