From 337e8e68209bd2481cbb11dacce61234dc5c9419 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:07:02 -0700 Subject: [PATCH] chore: get update-gyp.py to work with Python >= v3.5 (#2826) * chore: get update-gyp.py to work with Python v3.9 * Ruff ignore rule PLC1901 --------- Co-authored-by: Christian Clauss --- .github/workflows/tests.yml | 2 +- update-gyp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 73f6fcec45..0da6cdbf87 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: pip install --user ruff - - run: ruff --format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="S101,UP031" --target-version=py37 . + - run: ruff --format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="PLC1901,S101,UP031" --target-version=py37 . Tests: strategy: fail-fast: false diff --git a/update-gyp.py b/update-gyp.py index 19524bd6a7..70e2d10028 100755 --- a/update-gyp.py +++ b/update-gyp.py @@ -49,7 +49,7 @@ def safe_extract(tar, path=".", members=None, *, numeric_owner=False): if not is_within_directory(path, member_path): raise Exception("Attempted Path Traversal in Tar File") - tar.extractall(path, members, numeric_owner) + tar.extractall(path, members, numeric_owner=numeric_owner) safe_extract(tar_ref, unzip_target)