Unverified Commit 31eeb60f authored by oshiteku's avatar oshiteku Committed by GitHub
Browse files

Fix invalid escape sequence warning in Python 3.12 (#1420)

* Fix syntax warning

* Update the ruff rules to check for warnings
parent 9264f02d
......@@ -45,7 +45,7 @@ def get_cuda_bnb_library_path(cuda_specs: CUDASpecs) -> Path:
override_value = os.environ.get("BNB_CUDA_VERSION")
if override_value:
library_name = re.sub("cuda\d+", f"cuda{override_value}", library_name, count=1)
library_name = re.sub(r"cuda\d+", f"cuda{override_value}", library_name, count=1)
logger.warning(
f"WARNING: BNB_CUDA_VERSION={override_value} environment variable detected; loading {library_name}.\n"
"This can be used to load a bitsandbytes version that is different from the PyTorch CUDA version.\n"
......
......@@ -14,7 +14,8 @@ line-length = 119
[tool.ruff.lint]
select = [
"B", # bugbear: security warnings
"E", # pycodestyle
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"F", # pyflakes
"I", # isort
"ISC", # implicit string concatenation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment