Skip to content

Commit

Permalink
content to source renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
eleonorecharles committed Jan 16, 2025
1 parent 8bfe2fc commit 8f209b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jupyter_nbmodel_client/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,24 +328,24 @@ def insert(self, index: int, value: dict[str, t.Any]) -> None:
with self._lock:
self._doc.ycells.insert(index, ycell)

def insert_code_cell(self, index: int, content: str, **kwargs) -> None:
def insert_code_cell(self, index: int, source: str, **kwargs) -> None:
"""Insert a code cell at position index.
Args:
index: The position of the inserted cell
content: Content to add to the cell
source: Code cell source
"""
cell = current_api.new_code_cell(content, **kwargs)
cell = current_api.new_code_cell(source, **kwargs)
self.insert(index, cell)

def insert_markdown_cell(self, index: int, content: str, **kwargs) -> None:
def insert_markdown_cell(self, index: int, source: str, **kwargs) -> None:
"""Insert a markdown cell at position index.
Args:
index: The position of the inserted cell
content: Content to add to the cell
source: Markdown cell source
"""
cell = current_api.new_markdown_cell(content, **kwargs)
cell = current_api.new_markdown_cell(source, **kwargs)
self.insert(index, cell)

def set_cell_source(self, index: int, source: str) -> None:
Expand Down

0 comments on commit 8f209b2

Please sign in to comment.