chore(api): enhance ruff rules to disallow dangerous functions and modules (#16461)
This commit is contained in:
parent
ac910ed200
commit
383af7bf76
2 changed files with 7 additions and 1 deletions
|
|
@ -910,7 +910,7 @@ class Embedding(db.Model): # type: ignore[name-defined]
|
|||
self.embedding = pickle.dumps(embedding_data, protocol=pickle.HIGHEST_PROTOCOL)
|
||||
|
||||
def get_embedding(self) -> list[float]:
|
||||
return cast(list[float], pickle.loads(self.embedding))
|
||||
return cast(list[float], pickle.loads(self.embedding)) # noqa: S301
|
||||
|
||||
|
||||
class DatasetCollectionBinding(db.Model): # type: ignore[name-defined]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue