Skip to content

Adds Counter class to counter.py#699

Open
opencode-agent[bot] wants to merge 1 commit into
mainfrom
opencode/issue697-20260330053053
Open

Adds Counter class to counter.py#699
opencode-agent[bot] wants to merge 1 commit into
mainfrom
opencode/issue697-20260330053053

Conversation

@opencode-agent
Copy link
Copy Markdown

I've added the new file counter.py at the repo root with a Counter class that includes:

  • increment(amount=1)
  • decrement(amount=1)
  • get_value()

Usage example:

  • c = Counter()
  • c.increment()
  • c.increment(5)
  • c.decrement(2)
  • value = c.get_value() # 4 in this example

If you want a different interface (e.g., read-only value attribute, or initialization from an external config), I can adjust quickly.

Closes #697

New%20session%20-%202026-03-30T05%3A30%3A52.246Z
opencode session  |  github run

Co-authored-by: dzianisv <dzianisv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a counter.py script

0 participants