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

Apply black to notebooks #48

Open
tbekolay opened this issue Jul 24, 2019 · 0 comments
Open

Apply black to notebooks #48

tbekolay opened this issue Jul 24, 2019 · 0 comments

Comments

@tbekolay
Copy link
Member

Currently, our Black support is only for Python files and does not extend to Jupyter notebooks, which also contain Python code. There are several tools out there for applying black formatting to Jupyter notebooks, most of which are only accessible through the Jupyter notebook or Jupyterlab environment. A notable exception is black-nb, which looks to do almost exactly what we want -- I was able to reformat a notebook and check it through the command line.

However, it is a pretty small project and so some features are missing. Notably, it is not compatible with the most recent version of black, and it cannot currently be easily used as a pre-commit hook. I've made issues on that project to track those issues. If they're solved quickly then we should adopt black-nb; if not, we should think about either helping maintain the project, fork it, or some similar solution. Note that the project is only around 500 lines of Python code, so helping out should not be a big burden for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant