From 9e3c6c27081c7c1989cd23e144031d3ea58af7ec Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 22 Nov 2024 20:08:44 +0100 Subject: [PATCH] fix new ruff re errors --- contrib/cldis.py | 2 +- pyopencl/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/cldis.py b/contrib/cldis.py index d41cb0ba..d54fc91a 100644 --- a/contrib/cldis.py +++ b/contrib/cldis.py @@ -64,7 +64,7 @@ def main(ctx, tmp_dir, cl_str, output=None, build_options=()): if output == "sass": with open(os.path.join(tmp_dir, "cl.ptx"), "w") as f: f.write(res) - tgt = re.findall(".target sm_[0-9]*", res, re.MULTILINE)[0] + tgt = re.findall(r".target sm_[0-9]*", res, re.MULTILINE)[0] gpu_name = tgt[8:] subprocess.check_call(["ptxas", "cl.ptx", "--verbose", f"--gpu-name={gpu_name}", "--warn-on-spills"], cwd=tmp_dir) diff --git a/pyopencl/version.py b/pyopencl/version.py index 9f901196..2cd0fffd 100644 --- a/pyopencl/version.py +++ b/pyopencl/version.py @@ -3,7 +3,7 @@ from importlib import metadata VERSION_TEXT = metadata.version("pyopencl") -_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT) +_match = re.match(r"^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT) assert _match is not None VERSION_STATUS = _match.group(2) VERSION = tuple(int(nr) for nr in _match.group(1).split(".")) -- GitLab