-
Notifications
You must be signed in to change notification settings - Fork 5
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 and extra tests for literals #115
base: main
Are you sure you want to change the base?
Conversation
8dab859
to
c2b9cdf
Compare
rewrite/tests/python/all/format/tabs_and_indents_visitor_test.py
Outdated
Show resolved
Hide resolved
@nielsdebruin On my computer the |
It does, but I believe this problem is also present in main. |
Yes, I think so. But with this PR the indent of the return statement is wrong, which I believe isn't the case on main. |
@knutwannheden I ran the test, I see the indentation, but there is not difference between my main, and this branch. main:
This branch:
|
I thought that was working at some point. This definitely needs to be fixed so that we don't produce code that doesn't compile. |
I suggest we try to fix that first, independently of this PR, and then we can see how we can merge this PR afterwards. |
What's changed?
The
TabsAndIndentsVisitor
cannot correctly handle literals that are not assigned to anything. This PR will fix this behavior and adds extra tests.What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Any additional context
Checklist