From 6b691bc4ddf59dd16af3db98e50b4d7975105867 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig <tautschn@amazon.com> Date: Mon, 13 Nov 2023 16:38:06 +0000 Subject: [PATCH] Fix invalid-escape-sequence warning Python warns about the use of `\d`: we should use raw strings here as that's not meant to be an escape sequence. --- .github/workflows/pull-request-check-rust-api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-check-rust-api.yaml b/.github/workflows/pull-request-check-rust-api.yaml index 802d9a630745..6c7d9e96ec6b 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -62,7 +62,7 @@ jobs: # by the other jobs already present in `pull-request-checks.yaml`. - name: Run Rust API tests run: | - VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))") + VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))") cd src/libcprover-rust;\ cargo clean;\ CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1 @@ -102,7 +102,7 @@ jobs: # by the other jobs already present in `pull-request-checks.yaml`. - name: Run Rust API tests run: | - VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))") + VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))") cd src/libcprover-rust;\ cargo clean;\ CBMC_INCLUDE_DIR=../../${{env.default_include_dir}} CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1