chroma: add ruff bandit rules (#31790)

This commit is contained in:
Mason Daugherty 2025-06-30 14:00:08 -04:00 committed by GitHub
parent 1a5120dc9d
commit 247673ddb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -62,7 +62,7 @@ disallow_untyped_defs = true
target-version = "py39"
[tool.ruff.lint]
select = ["E", "F", "I", "T201", "D", "UP"]
select = ["E", "F", "I", "T201", "D", "UP", "S"]
ignore = [ "UP007", ]
[tool.coverage.run]
@ -81,3 +81,9 @@ convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"S101", # Tests need assertions
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]

View File

@ -574,7 +574,7 @@ def test_chroma_add_documents_mixed_metadata() -> None:
def is_api_accessible(url: str) -> bool:
try:
response = requests.get(url)
response = requests.get(url, timeout=5)
return response.status_code == 200
except Exception:
return False