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

Decrease cost of ipynb code path when unneeded #3748

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

hauntsaninja
Copy link
Collaborator

IPython is a very expensive import, like, at least 300ms. I'd also venture that it's much more common than tokenize-rt, which is like 30ms. I work in a repo where I use black, have IPython installed and there happen to be a couple notebooks (that we don't want formatted). I know I can force exclude ipynb, but this change doesn't really have a cost.

IPython is a very expensive import, like, at least 300ms. I'd also
venture that it's much more common than tokenize-rt, which is like 30ms.
I work in a repo where I use black, have IPython installed and there
happen to be a couple notebooks (that we don't want formatted). I know I
can force exclude ipynb, but this change doesn't really have a cost.
@github-actions
Copy link

github-actions bot commented Jun 24, 2023

diff-shades reports zero changes comparing this PR (467a2c9) to main (93989e9).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra JelleZijlstra merged commit 31b3b67 into psf:main Jun 27, 2023
@hauntsaninja hauntsaninja deleted the jupy branch June 27, 2023 00:53
SWHL pushed a commit to SWHL/black that referenced this pull request Jun 27, 2023
IPython is a very expensive import, like, at least 300ms. I'd also
venture that it's much more common than tokenize-rt, which is like 30ms.
I work in a repo where I use black, have IPython installed and there
happen to be a couple notebooks (that we don't want formatted). I know I
can force exclude ipynb, but this change doesn't really have a cost.
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