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 Jan 17, 2025
1 parent 83cee0a commit 8023f13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion marimo/_save/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def generic_visit(self, node: ast.AST) -> tuple[ast.Module, ast.Module]: # typ
assert isinstance(node, list), "Unexpected block structure."
for n in node:
# There's a chance that the block is first evaluated somewhere in a
# multine line expression, so check that the "target" line is in the
# multiline line expression, so check that the "target" line is in the
# interval.
parent = None
if n.lineno < self.target_line:
Expand Down
2 changes: 1 addition & 1 deletion marimo/_save/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def hash_cell_group(
cell_impl = graph.cells[cell_id]
hashes.append(hash_cell_impl(cell_impl, hash_alg.name))

# Sort results post hash, to ensure deterministic oredering.
# Sort results post hash, to ensure deterministic ordering.
for hashed_cell in sorted(hashes):
hash_alg.update(hashed_cell)
return hash_alg.digest()
Expand Down
4 changes: 4 additions & 0 deletions tests/_save/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,11 +1216,15 @@ def __(mo):
@mo.cache
def h(state):
x = state()

def g():
global state

def f(state):
return x + state()

return state() + g(state2)

return g()

assert g(state0) == 111
Expand Down

0 comments on commit 8023f13

Please sign in to comment.