Open
Conversation
added 2 commits
August 19, 2020 11:57
- Give a function name for easier debugging - Use === comparison instead of == to avoid type coercion
- Set a black-friendly max line length of 88 chars in .flake8 - Note that there are a number of unused variables in lab_black.py
dnanhkhoa
reviewed
Aug 23, 2020
| # -*- coding: utf-8 -*- | ||
| from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
|
||
| from lab_black import BlackFormatter, black_formatter, unload_ipython_extension |
Owner
There was a problem hiding this comment.
If you remove unload_ipython_extension, I guess notebook users are not able to unload the extension
Author
There was a problem hiding this comment.
Ah, true but I'm not sure unloading works as it should anyway.
If you clone my reload branch and run the Reload.ipynb, it looks as though format_cell() gets called once for each time you have loaded the extension and cells still get formatted after calling %unload_ext.
We could have a separate unload function in nb_black.py (which is what I have suggested in the latest commit in this branch).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran ESLint demo on the JS:
letorconstin place ofvar)I ran flake8 on the .py files: