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

Use source type to determine parser mode for formatting #8205

Merged
merged 1 commit into from Oct 25, 2023

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Oct 25, 2023

Summary

This PR fixes the bug where if a Notebook contained IPython syntax, then the format command would fail. This was because the correct mode was not being used while parsing through the formatter code path.

Test Plan

This PR isn't the only requirement for Notebook formatting to start working with IPython escape commands. The following PR in the stack is required as well.

@dhruvmanila dhruvmanila added bug Something isn't working formatter Related to the formatter labels Oct 25, 2023
@dhruvmanila
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

@dhruvmanila dhruvmanila marked this pull request as ready for review October 25, 2023 10:20
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd move the fixes: #8204 to the PR up the stack so it's easier to trace later

@dhruvmanila dhruvmanila merged commit c2ec5f0 into main Oct 25, 2023
17 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/formatter-source-type branch October 25, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter Related to the formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants