Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
65a02f7d
Unverified
Commit
65a02f7d
authored
Feb 07, 2024
by
Bowen Liang
Committed by
GitHub
Feb 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: apply F811 linter rule to eliminate redefined imports and methods (#2412)
parent
acf9174b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
41 deletions
+1
-41
document.py
api/controllers/service_api/dataset/document.py
+0
-1
_client.py
api/core/model_runtime/model_providers/spark/llm/_client.py
+0
-1
spark_llm.py
api/core/third_party/spark/spark_llm.py
+0
-1
gmpy2_pkcs10aep_cipher.py
api/libs/gmpy2_pkcs10aep_cipher.py
+0
-38
pyproject.toml
api/pyproject.toml
+1
-0
No files found.
api/controllers/service_api/dataset/document.py
View file @
65a02f7d
import
json
from
flask
import
request
from
flask_login
import
current_user
from
flask_restful
import
marshal
,
reqparse
from
sqlalchemy
import
desc
from
werkzeug.exceptions
import
NotFound
...
...
api/core/model_runtime/model_providers/spark/llm/_client.py
View file @
65a02f7d
import
base64
import
datetime
import
hashlib
import
hmac
import
json
...
...
api/core/third_party/spark/spark_llm.py
View file @
65a02f7d
import
base64
import
datetime
import
hashlib
import
hmac
import
json
...
...
api/libs/gmpy2_pkcs10aep_cipher.py
View file @
65a02f7d
...
...
@@ -238,41 +238,3 @@ def new(key, hashAlgo=None, mgfunc=None, label=b'', randfunc=None):
if
randfunc
is
None
:
randfunc
=
Random
.
get_random_bytes
return
PKCS1OAEP_Cipher
(
key
,
hashAlgo
,
mgfunc
,
label
,
randfunc
)
def
new
(
key
,
hashAlgo
=
None
,
mgfunc
=
None
,
label
=
b
''
,
randfunc
=
None
):
"""Return a cipher object :class:`PKCS1OAEP_Cipher` that can be used to perform PKCS#1 OAEP encryption or decryption.
:param key:
The key object to use to encrypt or decrypt the message.
Decryption is only possible with a private RSA key.
:type key: RSA key object
:param hashAlgo:
The hash function to use. This can be a module under `Crypto.Hash`
or an existing hash object created from any of such modules.
If not specified, `Crypto.Hash.SHA1` is used.
:type hashAlgo: hash object
:param mgfunc:
A mask generation function that accepts two parameters: a string to
use as seed, and the lenth of the mask to generate, in bytes.
If not specified, the standard MGF1 consistent with ``hashAlgo`` is used (a safe choice).
:type mgfunc: callable
:param label:
A label to apply to this particular encryption. If not specified,
an empty string is used. Specifying a label does not improve
security.
:type label: bytes/bytearray/memoryview
:param randfunc:
A function that returns random bytes.
The default is `Random.get_random_bytes`.
:type randfunc: callable
"""
if
randfunc
is
None
:
randfunc
=
Random
.
get_random_bytes
return
PKCS1OAEP_Cipher
(
key
,
hashAlgo
,
mgfunc
,
label
,
randfunc
)
api/pyproject.toml
View file @
65a02f7d
...
...
@@ -14,4 +14,5 @@ select = [
"F401"
,
# unused-import
"I001"
,
# unsorted-imports
"I002"
,
# missing-required-import
"F811"
,
# redefined-while-unused
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment