Fix: preserve Python variable name for returned input aliases#2788
Fix: preserve Python variable name for returned input aliases#2788Aniketsy wants to merge 3 commits intomicrosoft:mainfrom
Conversation
|
@Aniketsy thanks, could you resolve the merge conflicts? |
|
Sorry, I'll fix this |
|
@justinchuby please review these, when you get a chance, I've fixed conflicts. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2788 +/- ##
==========================================
- Coverage 70.45% 70.45% -0.01%
==========================================
Files 228 228
Lines 27177 27180 +3
Branches 2734 2735 +1
==========================================
+ Hits 19148 19150 +2
Misses 7092 7092
- Partials 937 938 +1 ☔ View full report in Codecov by Sentry. |
| return_var = self._emit_copy(return_var, preferred_name) | ||
| suggested_name = preferred_name | ||
| if isinstance(exp, ast.Name): | ||
| suggested_name = exp.id |
There was a problem hiding this comment.
A unit test would make it clear what this does. It sounds reasonable to me, but would be good to see it illustrated with an example. Specifically, if this is returning an input called X, the output cannot also be called X. Would it get renamed into something like "X_1" ?
#2714