Skip to content

Commit

Permalink
Merge branch 'number_of_methods' of https://github.com/lukyanoffpasho…
Browse files Browse the repository at this point in the history
…k/aibolit into number_of_methods
  • Loading branch information
lukyanoffpashok committed Aug 13, 2020
2 parents ee7f7bf + 2a808bb commit 3a9bd8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions aibolit/ast_framework/computed_fields_catalog/nodes_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ def nodes_filter_factory(

def filter(base_node: ASTNode) -> Iterator[ASTNode]:
base_field = getattr(base_node, base_field_name)
if isinstance(base_field, list) and all(
isinstance(item, ASTNode) for item in base_field
):
if isinstance(base_field, list):
for node in base_field:
if node.node_type in node_types:
if isinstance(node, ASTNode) and node.node_type in node_types:
yield node
else:
raise RuntimeError(
Expand Down

0 comments on commit 3a9bd8e

Please sign in to comment.