Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2024
1 parent 9a48bd9 commit 4feb4d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/chat_handlers/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def create_notebook(outline):
# Post process notebook for hanging cells: merge hanging cell with the previous cell
nb_cells = list()
for cell in nb["cells"]:
if (cell["cell_type"] == 'code') and (cell["source"][0] == ' '):
nb_cells[-1]["source"] = nb_cells[-1]["source"] + '\n\n' + cell["source"]
if (cell["cell_type"] == "code") and (cell["source"][0] == " "):
nb_cells[-1]["source"] = nb_cells[-1]["source"] + "\n\n" + cell["source"]
else:
nb_cells.append(cell)
nb["cells"] = nb_cells
Expand Down

0 comments on commit 4feb4d1

Please sign in to comment.