(node: LN)
| 556 | """Whether whitespace around `**` should be removed.""" |
| 557 | |
| 558 | def is_simple(node: LN) -> bool: |
| 559 | if isinstance(node, Leaf): |
| 560 | return node.type in (token.NAME, token.NUMBER, token.DOT, token.DOUBLESTAR) |
| 561 | elif node.type == syms.factor: # unary operators |
| 562 | return is_simple(node.children[1]) |
| 563 | else: |
| 564 | return all(is_simple(child) for child in node.children) |
| 565 | |
| 566 | return ( |
| 567 | node.type == syms.power |
no outgoing calls
no test coverage detected