From b279d1904085d0265c4b0a0ef5843bc11b22c837 Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Wed, 9 Oct 2024 21:12:50 +0800 Subject: [PATCH] chore: avoid star imports usage (#9123) --- api/pyproject.toml | 2 -- api/services/account_service.py | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/api/pyproject.toml b/api/pyproject.toml index 48418974d4..956d4dbd11 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -45,8 +45,6 @@ ignore = [ "E721", # type-comparison "E722", # bare-except "E731", # lambda-assignment - "F403", # undefined-local-with-import-star - "F405", # undefined-local-with-import-star-usage "F821", # undefined-name "F841", # unused-variable "FURB113", # repeated-append diff --git a/api/services/account_service.py b/api/services/account_service.py index c3d3354a1d..05b505f8a6 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -1,4 +1,5 @@ import base64 +import json import logging import secrets import uuid @@ -12,12 +13,22 @@ from werkzeug.exceptions import Unauthorized from configs import dify_config from constants.languages import language_timezone_mapping, languages from events.tenant_event import tenant_was_created +from extensions.ext_database import db from extensions.ext_redis import redis_client from libs.helper import RateLimiter, TokenManager from libs.passport import PassportService from libs.password import compare_password, hash_password, valid_password from libs.rsa import generate_key_pair -from models.account import * +from models.account import ( + Account, + AccountIntegrate, + AccountStatus, + Tenant, + TenantAccountJoin, + TenantAccountJoinRole, + TenantAccountRole, + TenantStatus, +) from models.model import DifySetup from services.errors.account import ( AccountAlreadyInTenantError,