Skip to content

The agent engineering platform.

langchain-huggingface[patch]: Add ruff bandit rules to linter (#31798)

Mason Daugherty425ee525812c
diff --git a/libs/partners/huggingface/pyproject.toml b/libs/partners/huggingface/pyproject.toml
index e1b3de9b8c..abafb7d293 100644
--- a/libs/partners/huggingface/pyproject.toml
+++ b/libs/partners/huggingface/pyproject.toml
@@ -58,7 +58,7 @@ disallow_untyped_defs = "True"
target-version = "py39"
[tool.ruff.lint]
-select = ["E", "F", "I", "T201", "UP"]
+select = ["E", "F", "I", "T201", "UP", "S"]
ignore = ["UP007"]
[tool.coverage.run]
@@ -71,3 +71,9 @@ markers = [
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
+
+[tool.ruff.lint.extend-per-file-ignores]
+"tests/**/*.py" = [
+ "S101", # Tests need assertions
+ "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
+]