(pairs)
| 580 | |
| 581 | |
| 582 | def parse_list(pairs): |
| 583 | options = {} |
| 584 | for key, value in pairs: |
| 585 | try: |
| 586 | value = ast.literal_eval(value) |
| 587 | except ValueError: |
| 588 | pass |
| 589 | options[key] = value |
| 590 | return options |
| 591 | |
| 592 | |
| 593 | # Adapted from https://github.com/pallets/click/blame/main/src/click/utils.py |