-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: conversion of ipynb files with multiple definitions (#3458)
The `NameTransformer` wasn't visiting node descendants, leading to incomplete transformations. Before, when remapping `x` to a local: ```python x = 1 y = foo(x + 1) ``` was yielding ```python x = 1 y = foo(x + 1) ``` With this change, it now yields ```python _x = 1 y = foo(_x + 1) ``` This change also modifies an old test that was testing that the `NameTransformer` respected scoping logic. But it never actually did, or rather only did so because of a bug in which it wasn't visiting entire subtrees. Nothing relies on the `NameTransformer` respecting scoping in our codebase.
- Loading branch information
Showing
3 changed files
with
119 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.