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.217]) by gnuweeb.org (Postfix) with ESMTPSA id 9BD9B7E257; Mon, 3 Oct 2022 23:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1664841198; bh=75mKsqZ0jap/fM9iuv7zbwxKD33X7ybyw8M9djaO7nE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hR2JF8QW/BYldLDBlhSsKzY5/FCpx/bvAJahGZP+b0XHkUGcgiGpdSRl2ANCwyK9A UXxag0OXr0zI7/Jpy+EQLdomWXLWTWzChRbUL5jsC+KL85tTQsmI89uL7kEUA/9FMi 9orkgGSvxHWHLh3vLSNTTkieQA3OLALGuZ1ffTQ2/0YEo7Tuv4BW1/JEsHivTWh/D+ jvUs/FWwWqL78LcmAq3ilJw7OWG/63MbdLs0NvH5IgwB1ob6btQM6R7qdaMOUCJqUj fp/aE9R6AeVqszOxmvGaqlkr9tzOTNmnxm46/1F65eKFVNe6ab/pCj9aT6PJAM6U5c 4CrB2p8DRYhjw== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v2 12/28] discord: Inherit the DBMethods() class to the DB() class Date: Tue, 4 Oct 2022 06:52:13 +0700 Message-Id: <20221003235230.1824-13-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20221003235230.1824-1-kiizuha@gnuweeb.org> References: <20221003235230.1824-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