(from_type, to_type)
| 512 | # Cast replacement from from_type to to_type if the replacement and original |
| 513 | # types match from_type and to_type |
| 514 | def conditional_cast(from_type, to_type): |
| 515 | if replacement_type == from_type and original_type == to_type: |
| 516 | return True, to_type(replacement) |
| 517 | else: |
| 518 | return False, None |
| 519 | |
| 520 | # Conditionally casts |
| 521 | # list <-> tuple |
no outgoing calls
no test coverage detected