mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 12:18:24 +00:00
chroma: add ruff bandit rules (#31790)
This commit is contained in:
parent
1a5120dc9d
commit
247673ddb8
@ -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
|
||||
]
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user