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

Handle trailing newline as per black for Jupyter notebooks #5190

Closed
Tracked by #5188
dhruvmanila opened this issue Jun 19, 2023 · 0 comments · Fixed by #5202
Closed
Tracked by #5188

Handle trailing newline as per black for Jupyter notebooks #5190

dhruvmanila opened this issue Jun 19, 2023 · 0 comments · Fixed by #5202
Assignees
Labels
core Related to core functionality

Comments

@dhruvmanila
Copy link
Member

dhruvmanila commented Jun 19, 2023

Trailing newline at the end of JSON string is handled separated in black implementation:

https://github.com/psf/black/blob/e7783e9ab27e95cd9b50c2ef84174f4e1c9d60cd/src/black/__init__.py#L1024

@dhruvmanila dhruvmanila added the core Related to core functionality label Jun 19, 2023
@dhruvmanila dhruvmanila self-assigned this Jun 20, 2023
dhruvmanila added a commit that referenced this issue Jun 20, 2023
## Summary

Handle trailing newline in Jupyter Notebook JSON string similar to how
`black`
does it.

## Test Plan

Add test cases when the JSON string for notebook ends with and without a
newline.

resolves: #5190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant