MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / set_limit

Method set_limit

uncommon_route/spend_control.py:141–145  ·  view source on GitHub ↗
(self, window: SpendWindow, amount: float)

Source from the content-addressed store, hash-verified

139 self._load()
140
141 def set_limit(self, window: SpendWindow, amount: float) -> None:
142 if amount <= 0 or not isinstance(amount, (int, float)):
143 raise ValueError("Limit must be a positive number")
144 setattr(self._limits, window, float(amount))
145 self._save()
146
147 def clear_limit(self, window: SpendWindow) -> None:
148 setattr(self._limits, window, None)

Calls 1

_saveMethod · 0.95