Skip to content

Commit

Permalink
Use empty metadata instead of None as it's required (#485)
Browse files Browse the repository at this point in the history
## Summary

Related to astral-sh/ruff#12864, the cell
metadata is actually a required field. We got away with it previously
because Ruff used `Value`.
  • Loading branch information
dhruvmanila authored Sep 3, 2024
1 parent 4160872 commit d0db7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruff_lsp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def _create_notebook_json(notebook_document: NotebookDocument) -> str:
cells.append(
{
"cell_type": "code",
"metadata": None,
"metadata": {},
"outputs": [],
"source": cell_document.source,
}
Expand All @@ -403,7 +403,7 @@ def _create_notebook_json(notebook_document: NotebookDocument) -> str:
cells.append(
{
"cell_type": "markdown",
"metadata": None,
"metadata": {},
"source": cell_document.source,
}
)
Expand Down

0 comments on commit d0db7f7

Please sign in to comment.