If the given argument annotation expression is a star unpack e.g. `'*Ts'` rewrite it to a valid expression.
(arg)
| 1115 | |
| 1116 | |
| 1117 | def _rewrite_star_unpack(arg): |
| 1118 | """If the given argument annotation expression is a star unpack e.g. `'*Ts'` |
| 1119 | rewrite it to a valid expression. |
| 1120 | """ |
| 1121 | if arg.lstrip().startswith("*"): |
| 1122 | return f"({arg},)[0]" # E.g. (*Ts,)[0] or (*tuple[int, int],)[0] |
| 1123 | else: |
| 1124 | return arg |
| 1125 | |
| 1126 | |
| 1127 | def _get_and_call_annotate(obj, format): |
no test coverage detected
searching dependent graphs…