Skip to content

Commit

Permalink
snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Mar 7, 2025
1 parent 5b01ba1 commit 6eec192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions marimo/_ast/toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# Constant for easy reuse in tests
HINT_UNPARSABLE = "Cannot parse cell."
HINT_BAD_NAME = (
"Top level definitions cannot be named 'app', '__name__' or 'generated'"
"Top level definitions cannot be named 'app', '__name__' or "
"'__generated_with'"
)
HINT_NOT_SINGLE = "Cell must contain exactly one function definition"
HINT_ORDER_DEPENDENT = (
Expand Down Expand Up @@ -97,7 +98,7 @@ def update(
return

(self.name,) = self._cell.defs
if self.name in ("app", "__generated__", "__name__"):
if self.name in ("app", "__generated_with", "__name__"):
self.demote(HINT_BAD_NAME)
return

Expand Down
2 changes: 1 addition & 1 deletion tests/_ast/test_pytest_toplevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import marimo

__generated_with = "0.11.14"
__generated_with = "0.0.0"
app = marimo.App(_toplevel_fn=True)

with app.setup:
Expand Down

0 comments on commit 6eec192

Please sign in to comment.