refactor(ollama): clean up tests (#33198)

This commit is contained in:
Mason Daugherty
2025-10-01 21:52:01 -04:00
committed by GitHub
parent a89c549cb0
commit a9eda18e1e
11 changed files with 387 additions and 436 deletions

View File

@@ -60,15 +60,17 @@ ignore = [
"SLF001", # Private member access
"UP007", # pyupgrade: non-pep604-annotation-union
"UP045", # pyupgrade: non-pep604-annotation-optional
"PLR0912",
"C901",
"PLR0915",
"FIX002", # TODOs
"TD002", # TODO authors
"TC002", # Incorrect type-checking block
"TC003", # Incorrect type-checking block
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"C901", # Function too complex
"FBT001", # Boolean function param
# TODO:
# TODO
"ANN401",
"TC002",
"TC003",
"TRY301",
]
unfixable = ["B028"] # People should intentionally tune the stacklevel
@@ -91,16 +93,11 @@ 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
"PLR2004",
# TODO
"ANN401",
"ARG001",
"PT011",
"FIX",
"TD",
"S101", # Tests need assertions
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"ARG001", # Unused function arguments in tests (e.g. kwargs)
"PLR2004", # Magic value in comparisons
"PT011", # `pytest.raises()` is too broad
]
"scripts/*.py" = [
"INP001", # Not a package