Skip to content

Commit

Permalink
more memoization bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Nov 29, 2023
1 parent 4c5ca0d commit ac78cf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/ipyflow/data_model/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def to_ast(self, override: Optional[ast.Module] = None) -> ast.Module:
return self._cached_ast
if (
self._cached_ast is None
or self.last_ast_content is None
or len(self.last_ast_content) != len(self.current_content)
or self.last_ast_content != self.current_content
):
Expand Down
4 changes: 2 additions & 2 deletions core/ipyflow/shell/interactiveshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ def before_run_cell(
if sym.obj is not value:
self.user_ns[sym.name] = value
sym.update_obj_ref(value)
new_updated_ts = Timestamp(self.cell_counter(), out_ts.stmt_num)
sym.refresh(timestamp=new_updated_ts)
new_updated_ts = Timestamp(self.cell_counter(), out_ts.stmt_num)
sym.refresh(timestamp=new_updated_ts)
return f"Out.get({identical_result_ctr})"

# Stage 1: Precheck.
Expand Down

0 comments on commit ac78cf8

Please sign in to comment.