Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: conversion of ipynb files with multiple definitions #3458

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

akshayka
Copy link
Contributor

The NameTransformer wasn't visiting node descendants, leading to incomplete transformations.

Before, when remapping x to a local:

x = 1
y = foo(x + 1)

was yielding

x = 1
y = foo(x + 1)

With this change, it now yields

_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.

The NodeTransformer wasn't visiting node descendants, leading to
incomplete transformations.
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 4:59am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 4:59am

@akshayka akshayka requested a review from mscolnick January 16, 2025 05:00
@akshayka akshayka merged commit ede87f5 into main Jan 16, 2025
33 of 34 checks passed
@akshayka akshayka deleted the aka/fix-multiple-definition-fixup branch January 16, 2025 05:48
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.14-dev22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants