From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.125.177]) by gnuweeb.org (Postfix) with ESMTPSA id B53CF804FD; Sat, 1 Oct 2022 13:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1664629480; bh=75mKsqZ0jap/fM9iuv7zbwxKD33X7ybyw8M9djaO7nE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bCCuQWiYQeYii+cKnrYuHimBTwwOTuNEI0vxt0n4ejLcfDboez+DkskiZKEqj3yh5 iMrigLw1VCVEx+1gamMW17e+pHfuNIbHwpMrzTPMPyNDVAVGEIyW+bHPbdFafEMRzM vLkFKys1llkoXMZkXg9qW52BAmPQfIp9t4U0LGTICwX2vG+5ludJ6Hf9kO5Q/vu5xk qUgvR7Bn5WwXT6BrfxcGa6TmT/TMQvI3by1WTLhuHNX3z6dM9ywfYgYTtbqZ+SNDLE k5vDhGu8DyqXyifXpvBXP/sJXWnrSQlQugLsVJUbk+tpTV8z+B8qAXZxwRi+OaRQsk QeRp6GOtjiUJg== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v1 10/26] discord: Inherit the DBMethods() class to the DB() class Date: Sat, 1 Oct 2022 20:03:38 +0700 Message-Id: <20221001130355.784-11-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20221001130355.784-1-kiizuha@gnuweeb.org> References: <20221001130355.784-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Use the DBMethods() class to the DB() class, so all the methods functions like insertion, getter, and deletion are relationship with the DB() class. It's cleaner and manageable-maintainable. Signed-off-by: Muhammad Rizki --- daemon/dscord/database/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/dscord/database/core.py b/daemon/dscord/database/core.py index 1a25388..c34d7a8 100644 --- a/daemon/dscord/database/core.py +++ b/daemon/dscord/database/core.py @@ -5,7 +5,10 @@ # -class DB: +from .methods import DBMethods + + +class DB(DBMethods): def __init__(self, conn): self.conn = conn self.conn.autocommit = True -- Muhammad Rizki