mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-03 19:57:51 +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"
|
target-version = "py39"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "T201", "D", "UP"]
|
select = ["E", "F", "I", "T201", "D", "UP", "S"]
|
||||||
ignore = [ "UP007", ]
|
ignore = [ "UP007", ]
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
@ -81,3 +81,9 @@ convention = "google"
|
|||||||
|
|
||||||
[tool.ruff.lint.per-file-ignores]
|
[tool.ruff.lint.per-file-ignores]
|
||||||
"tests/**" = ["D"]
|
"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:
|
def is_api_accessible(url: str) -> bool:
|
||||||
try:
|
try:
|
||||||
response = requests.get(url)
|
response = requests.get(url, timeout=5)
|
||||||
return response.status_code == 200
|
return response.status_code == 200
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user