Skip to content

Commit dfa6e97

Browse files
fix: drop unused llama_cpp import in GGUF cross-encoder dependency check
Replaced the unused top-level import in `_check_llama_cpp` with `__import__("llama_cpp")`. This maintains the optional dependency check and custom error message while satisfying linting rules (F401). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 7b96533 commit dfa6e97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

qwen3_embed/rerank/cross_encoder/gguf_cross_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
def _check_llama_cpp() -> None:
6868
"""Check that llama-cpp-python is installed."""
6969
try:
70-
import llama_cpp # type: ignore[unresolved-import] # noqa: F401
70+
__import__("llama_cpp")
7171
except ImportError as e:
7272
msg = (
7373
"llama-cpp-python is required for GGUF models. "

0 commit comments

Comments
 (0)