(predicate, components, type_=Or)
| 4002 | |
| 4003 | |
| 4004 | def _get_predicate_components(predicate, components, type_=Or): |
| 4005 | if not isinstance(predicate, type_): |
| 4006 | components.append(predicate) |
| 4007 | return components |
| 4008 | if isinstance(predicate.left, type_): |
| 4009 | components = _get_predicate_components(predicate.left, components, type_) |
| 4010 | else: |
| 4011 | components.append(predicate.left) |
| 4012 | if isinstance(predicate.right, type_): |
| 4013 | components = _get_predicate_components(predicate.right, components, type_) |
| 4014 | else: |
| 4015 | components.append(predicate.right) |
| 4016 | return components |
| 4017 | |
| 4018 | |
| 4019 | def _convert_mapping(components): |
no outgoing calls
no test coverage detected
searching dependent graphs…