Turn a dependency list into lowercase, and make sure all entries that are just a string become a tuple of strings
(deps)
| 8 | |
| 9 | |
| 10 | def fix_deplist(deps): |
| 11 | """ Turn a dependency list into lowercase, and make sure all entries |
| 12 | that are just a string become a tuple of strings |
| 13 | """ |
| 14 | deps = [ |
| 15 | ((dep.lower(),) |
| 16 | if not isinstance(dep, (list, tuple)) |
| 17 | else tuple([dep_entry.lower() |
| 18 | for dep_entry in dep |
| 19 | ])) |
| 20 | for dep in deps |
| 21 | ] |
| 22 | return deps |
| 23 | |
| 24 | |
| 25 | class RecipeOrder(dict): |
no outgoing calls