From a046b8dea83e1dcd6e0a5830abdb6824d36b0030 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 17:49:51 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`joon321?= =?UTF-8?q?-patch-1`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @joon321. * https://github.com/joon321/myprogram/pull/1#issuecomment-3286318593 The following files were modified: * `SlackBot.py` --- SlackBot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SlackBot.py b/SlackBot.py index a7bb1db..2670af1 100644 --- a/SlackBot.py +++ b/SlackBot.py @@ -19,6 +19,15 @@ # there are no comments here def append_history(t): + """ + Append a session entry to the global history, keeping history length at most 20. + + Parameters: + t (dict): A history entry (e.g., session data with keys like 'user' and 'time') to append. + + Returns: + bool: Always returns True after appending. + """ if len(history) > 20: del history[:1] history.append(t)