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

Unintended inline code comment savings #473

Open
yifanwu opened this issue Jan 4, 2022 · 0 comments
Open

Unintended inline code comment savings #473

yifanwu opened this issue Jan 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@yifanwu
Copy link
Contributor

yifanwu commented Jan 4, 2022

Your code:

This was running the most recent version of Lineapy (at time of posting) on Python 3.9.

a = 1 # test
b = a + 1
import lineapy
b_art = lineapy.save(b, "b art")

Then b_art.code would return

a = 1 # test
b = a + 1

Issue: We had thought that all comments are excluded and I'm a little surprised that inline comments were even included. We should gather requirements around user needs for comments and create a more intentional experience.

I suspect that it has something to do with how inline comments could be use for type annotations (e.g., type-ignore) but I haven't investigated further yet. We should also add test cases so we make sure that different python versions behave the same way.

@yifanwu yifanwu added the bug Something isn't working label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant