Convert an annotation dict containing values to approximately the STRING format. Always returns a fresh a dictionary.
(annotations)
| 1104 | |
| 1105 | |
| 1106 | def annotations_to_string(annotations): |
| 1107 | """Convert an annotation dict containing values to approximately the STRING format. |
| 1108 | |
| 1109 | Always returns a fresh a dictionary. |
| 1110 | """ |
| 1111 | return { |
| 1112 | n: t if isinstance(t, str) else type_repr(t) |
| 1113 | for n, t in annotations.items() |
| 1114 | } |
| 1115 | |
| 1116 | |
| 1117 | def _rewrite_star_unpack(arg): |
searching dependent graphs…