mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
chore: refurish python code by applying Pylint linter rules (#8322)
This commit is contained in:
@@ -158,7 +158,7 @@ class NotionOAuth(OAuthDataSource):
|
||||
page_icon = page_result["icon"]
|
||||
if page_icon:
|
||||
icon_type = page_icon["type"]
|
||||
if icon_type == "external" or icon_type == "file":
|
||||
if icon_type in {"external", "file"}:
|
||||
url = page_icon[icon_type]["url"]
|
||||
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
|
||||
else:
|
||||
@@ -191,7 +191,7 @@ class NotionOAuth(OAuthDataSource):
|
||||
page_icon = database_result["icon"]
|
||||
if page_icon:
|
||||
icon_type = page_icon["type"]
|
||||
if icon_type == "external" or icon_type == "file":
|
||||
if icon_type in {"external", "file"}:
|
||||
url = page_icon[icon_type]["url"]
|
||||
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
|
||||
else:
|
||||
|
||||
@@ -4,9 +4,9 @@ from Crypto.Cipher import AES
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Random import get_random_bytes
|
||||
|
||||
import libs.gmpy2_pkcs10aep_cipher as gmpy2_pkcs10aep_cipher
|
||||
from extensions.ext_redis import redis_client
|
||||
from extensions.ext_storage import storage
|
||||
from libs import gmpy2_pkcs10aep_cipher
|
||||
|
||||
|
||||
def generate_key_pair(tenant_id):
|
||||
|
||||
Reference in New Issue
Block a user