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

Add rewriting of if expressions #603

Closed

Conversation

aneeshusa
Copy link

Only handle the case where we keep the else branch,
as that provides an ending-delimiter before which we remove all tokens.

Part of #162.

Only handle the case where we keep the `else` branch,
as that provides an ending-delimiter before which we remove all tokens.
@aneeshusa
Copy link
Author

This duplicates a large chunk of code, let me know if/how you would want that deduped.
Also let me know if this half of #162 seems safe to autofix or if there are edge cases I'm not thinking of.

@aneeshusa
Copy link
Author

Happy to add some more test coverage if this approach looks good to the maintainers.

@asottile asottile closed this Mar 28, 2022
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