Skip to content

Commit e8d5916

Browse files
committed
Lint
1 parent 31dd69d commit e8d5916

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

bitsandbytes/cextension.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def __init__(self, error_msg: str):
141141
self.error_msg = error_msg
142142
self.user_cuda_version = get_cuda_version_tuple()
143143
self.available_versions = get_available_cuda_binary_versions()
144-
self.override_value = os.environ.get("BNB_ROCM_VERSION") if HIP_ENVIRONMENT else os.environ.get("BNB_CUDA_VERSION")
144+
self.override_value = (
145+
os.environ.get("BNB_ROCM_VERSION") if HIP_ENVIRONMENT else os.environ.get("BNB_CUDA_VERSION")
146+
)
145147
self.requested_version = (
146148
parse_cuda_version(self.override_value)
147149
if self.override_value

tests/test_cuda_setup_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_get_rocm_bnb_library_path_rejects_cuda_override(monkeypatch, rocm70_spe
5858
"""BNB_CUDA_VERSION should be rejected on ROCm with a helpful error."""
5959
monkeypatch.delenv("BNB_ROCM_VERSION", raising=False)
6060
monkeypatch.setenv("BNB_CUDA_VERSION", "72")
61-
with pytest.raises(RuntimeError, match="BNB_CUDA_VERSION.*detected for ROCm"):
61+
with pytest.raises(RuntimeError, match=r"BNB_CUDA_VERSION.*detected for ROCm"):
6262
get_cuda_bnb_library_path(rocm70_spec)
6363

6464

0 commit comments

Comments
 (0)