Skip to content

Commit

Permalink
fix: __ for cell names in marimo convert (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayka authored Mar 12, 2024
1 parent bb2f605 commit a3e43e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion marimo/_cli/ipynb_to_marimo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def convert(notebook: dict[str, Any]) -> str:

return codegen.generate_filecontents(
sources,
["_" for _ in sources],
["__" for _ in sources],
[CellConfig() for _ in range(len(sources))],
)
6 changes: 3 additions & 3 deletions tests/_cli/test_ipynb_to_marimo.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ def test_arithmetic() -> None:
assert len(codes) == 2
assert codes[0] == "x = 0\nx"
assert codes[1] == "x + 1"
assert names == ["_", "_"]
assert names == ["__", "__"]


def test_blank() -> None:
codes, names = get_codes("blank")

assert len(codes) == 1
assert codes[0] == ""
assert names == ["_"]
assert names == ["__"]


def test_unparsable() -> None:
Expand All @@ -97,4 +97,4 @@ def test_unparsable() -> None:
assert len(codes) == 2
assert codes[0] == "!echo hello, world\n\nx = 0"
assert codes[1] == "x"
assert names == ["_", "_"]
assert names == ["__", "__"]

0 comments on commit a3e43e5

Please sign in to comment.