Skip to content

Commit

Permalink
chore: get update-gyp.py to work with Python >= v3.5 (#2826)
Browse files Browse the repository at this point in the history
* chore: get update-gyp.py to work with Python v3.9

* Ruff ignore rule PLC1901

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
  • Loading branch information
rzhao271 and cclauss committed Apr 6, 2023
1 parent 41882a9 commit 337e8e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion update-gyp.py
Expand Up @@ -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)

Expand Down

0 comments on commit 337e8e6

Please sign in to comment.