MCPcopy
hub / github.com/reflex-dev/reflex / _mark_dirty

Method _mark_dirty

reflex/state.py:1901–1913  ·  view source on GitHub ↗

Mark the substate and all parent states as dirty.

(self)

Source from the content-addressed store, hash-verified

1899 return await _resolve_delta(self.get_delta())
1900
1901 def _mark_dirty(self):
1902 """Mark the substate and all parent states as dirty."""
1903 state_name = self.get_name()
1904 if (
1905 self.parent_state is not None
1906 and state_name not in self.parent_state.dirty_substates
1907 ):
1908 self.parent_state.dirty_substates.add(self.get_name())
1909 self.parent_state._mark_dirty()
1910
1911 # have to mark computed vars dirty to allow access to newly computed
1912 # values within the same ComputedVar function
1913 self._mark_dirty_computed_vars()
1914
1915 def _update_was_touched(self):
1916 """Update the _was_touched flag based on dirty_vars."""

Callers 3

__setattr__Method · 0.95
mark_dirtyMethod · 0.45

Calls 2

get_nameMethod · 0.95

Tested by 1

mark_dirtyMethod · 0.36