search_ancestor now uses *node_types as a parameter instead of a mix of tuple and simple string like isinstance.

This commit is contained in:
Dave Halter committed 2017-05-02 19:19:07 +02:00
1 parent 6ea06fdfd8
commit 336b8a46d0
5 files changed
+8 -11

No files matched your search

+1 -1
View File
@@ -1013,7 +1013,7 @@ class Param(PythonBaseNode):
"""
Returns the function/lambda of a parameter.
"""
return search_ancestor(self, ('funcdef', 'lambdef'))
return search_ancestor(self, 'funcdef', 'lambdef')
def get_code(self, normalized=False, include_prefix=True, include_comma=True):
"""