(rd, ar)
| 826 | |
| 827 | |
| 828 | def dictappend(rd, ar): |
| 829 | if isinstance(ar, list): |
| 830 | for a in ar: |
| 831 | rd = dictappend(rd, a) |
| 832 | return rd |
| 833 | for k in ar.keys(): |
| 834 | if k[0] == '_': |
| 835 | continue |
| 836 | if k in rd: |
| 837 | if isinstance(rd[k], str): |
| 838 | rd[k] = [rd[k]] |
| 839 | if isinstance(rd[k], list): |
| 840 | if isinstance(ar[k], list): |
| 841 | rd[k] = rd[k] + ar[k] |
| 842 | else: |
| 843 | rd[k].append(ar[k]) |
| 844 | elif isinstance(rd[k], dict): |
| 845 | if isinstance(ar[k], dict): |
| 846 | if k == 'separatorsfor': |
| 847 | for k1 in ar[k].keys(): |
| 848 | if k1 not in rd[k]: |
| 849 | rd[k][k1] = ar[k][k1] |
| 850 | else: |
| 851 | rd[k] = dictappend(rd[k], ar[k]) |
| 852 | else: |
| 853 | rd[k] = ar[k] |
| 854 | return rd |
| 855 | |
| 856 | |
| 857 | def applyrules(rules, d, var={}): |
no test coverage detected
searching dependent graphs…