From 9987f895e93124501df2e875bd5e9b4e3f737dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=B9i=20Nguy=E1=BB=85n=20T=E1=BA=A5n=20Sang?= Date: Sat, 10 Feb 2024 11:35:24 +0700 Subject: [PATCH] Patch Remove unused imports --- FTS/update.py | 2 -- account/userid.py | 2 -- account/username.py | 2 -- adpn.py | 3 +-- initializer/database.py | 2 +- manager/edit.py | 2 -- manager/insert.py | 2 -- manager/manager.py | 1 - manager/remove.py | 2 -- 9 files changed, 2 insertions(+), 16 deletions(-) diff --git a/FTS/update.py b/FTS/update.py index 2976e1d..b3dbcbb 100644 --- a/FTS/update.py +++ b/FTS/update.py @@ -1,5 +1,3 @@ -import sqlite3 - from log.write import sys_log def Update_Virtual_Table(conn): diff --git a/account/userid.py b/account/userid.py index be45f9b..b22f86c 100644 --- a/account/userid.py +++ b/account/userid.py @@ -1,5 +1,3 @@ -import sqlite3 - def get_user_id(cursor, username): cursor.execute("SELECT id FROM users WHERE username = ?", (username,)) diff --git a/account/username.py b/account/username.py index 50a0b55..b095aad 100644 --- a/account/username.py +++ b/account/username.py @@ -1,5 +1,3 @@ -import sqlite3 - def get_username(cursor, user_id): cursor.execute("SELECT username FROM users WHERE id = ?", (user_id,)) diff --git a/adpn.py b/adpn.py index 7b8f5db..8d8b0eb 100644 --- a/adpn.py +++ b/adpn.py @@ -5,12 +5,11 @@ import subprocess from FTS.initializer import Initializer_Virtual_Table from FTS.update import Update_Virtual_Table -from account.userid import get_user_id from account.username import get_username from atmt import ATMT_STRT from initializer.database import Initializer_Database from initializer.loader import database_loader -from log.write import log, sys_log +from log.write import sys_log from account.loader import account_database_loader from account.reliability import get_user_reliability diff --git a/initializer/database.py b/initializer/database.py index 0132e40..ea08965 100644 --- a/initializer/database.py +++ b/initializer/database.py @@ -1,5 +1,5 @@ import sqlite3 -from log.write import log, sys_log +from log.write import sys_log from datetime import datetime from account.database import create_users_database diff --git a/manager/edit.py b/manager/edit.py index e2f9294..7cb6f37 100644 --- a/manager/edit.py +++ b/manager/edit.py @@ -4,8 +4,6 @@ from bs4 import BeautifulSoup import json from datetime import datetime -from urllib.parse import urlparse -from os.path import splitext GOOGLE_SAFE_BROWSING_API_KEY = 'API_KEY' diff --git a/manager/insert.py b/manager/insert.py index 163d52e..c14a1bb 100644 --- a/manager/insert.py +++ b/manager/insert.py @@ -4,8 +4,6 @@ from bs4 import BeautifulSoup import json from datetime import datetime -from urllib.parse import urlparse -from os.path import splitext GOOGLE_SAFE_BROWSING_API_KEY = 'API_KEY' diff --git a/manager/manager.py b/manager/manager.py index fac576e..93a8631 100644 --- a/manager/manager.py +++ b/manager/manager.py @@ -1,5 +1,4 @@ import streamlit as st -from account.userid import get_user_id from log.write import log from account.loader import account_database_loader from account.reliability import get_user_reliability diff --git a/manager/remove.py b/manager/remove.py index 7aefa4b..bbc400a 100644 --- a/manager/remove.py +++ b/manager/remove.py @@ -1,5 +1,3 @@ -import sqlite3 - def remove_data(conn, site_id): cursor = conn.cursor()